Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   dmsetup fails on latest kernel (http://www.linux-archive.org/device-mapper-development/622710-dmsetup-fails-latest-kernel.html)

"Kasatkin, Dmitry" 01-19-2012 11:51 AM

dmsetup fails on latest kernel
 
Hi,
I rebased on the stop of latest mainline tree and now dmsetup fails...It says: "Failed to create notification semaphore: Function not implemented".I run strace and saw that dmsetup uses "semget" which returns -ENOSYS...

Any ideas?
- Dmitry

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

"Kasatkin, Dmitry" 01-19-2012 12:02 PM

dmsetup fails on latest kernel
 
Hi,

(subject added)

I rebased on the stop of latest mainline tree and now dmsetup fails...
It says: "Failed to create notification semaphore: Function not implemented".
I run strace and saw that dmsetup uses "semget" which returns -ENOSYS...

It works on
122804ecb59493fbb4d31b3ba9ac59faaf45276f

but does not work on
ccb19d263fd1c9e34948e2158c53eacbff369344

Any ideas?

- Dmitry

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

"Kasatkin, Dmitry" 01-19-2012 02:56 PM

dmsetup fails on latest kernel
 
On Thu, Jan 19, 2012 at 3:02 PM, Kasatkin, Dmitry
<dmitry.kasatkin@intel.com> wrote:
> Hi,
>
> (subject added)
>
> I rebased on the stop of latest mainline tree and now dmsetup fails...
> It says: "Failed to create notification semaphore: Function not implemented".
> I run strace and saw that dmsetup uses "semget" which returns -ENOSYS...
>
> It works on
> 122804ecb59493fbb4d31b3ba9ac59faaf45276f
>
> but does not work on
> ccb19d263fd1c9e34948e2158c53eacbff369344
>
> Any ideas?
>
> - Dmitry

Hi,

I have bisected the problem...

It is introduced by this commit:

303395ac3bf3e2cb488435537d416bc840438fcb is the first bad commit
commit 303395ac3bf3e2cb488435537d416bc840438fcb
Author: H. Peter Anvin <hpa@linux.intel.com>
Date: Fri Nov 11 16:07:41 2011 -0800

x86: Generate system call tables and unistd_*.h from tables


It came from: Merge branch 'x86-syscall-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Was on 17.01.2012...

I have 32 bit VM and I have SYSVIPC enabled in the configuration...

- Dmitry

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

"Kasatkin, Dmitry" 01-19-2012 03:10 PM

dmsetup fails on latest kernel
 
On Thu, Jan 19, 2012 at 5:56 PM, Kasatkin, Dmitry
<dmitry.kasatkin@intel.com> wrote:
> On Thu, Jan 19, 2012 at 3:02 PM, Kasatkin, Dmitry
> <dmitry.kasatkin@intel.com> wrote:
>> Hi,
>>
>> (subject added)
>>
>> I rebased on the stop of latest mainline tree and now dmsetup fails...
>> It says: "Failed to create notification semaphore: Function not implemented".
>> I run strace and saw that dmsetup uses "semget" which returns -ENOSYS...
>>
>> It works on
>> 122804ecb59493fbb4d31b3ba9ac59faaf45276f
>>
>> but does not work on
>> ccb19d263fd1c9e34948e2158c53eacbff369344
>>
>> Any ideas?
>>
>> - Dmitry
>
> Hi,
>
> I have bisected the problem...
>
> It is introduced by this commit:
>
> 303395ac3bf3e2cb488435537d416bc840438fcb is the first bad commit
> commit 303395ac3bf3e2cb488435537d416bc840438fcb
> Author: H. Peter Anvin <hpa@linux.intel.com>
> Date: * Fri Nov 11 16:07:41 2011 -0800
>
> * *x86: Generate system call tables and unistd_*.h from tables
>
>
> It came from: *Merge branch 'x86-syscall-for-linus' of
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> Was on 17.01.2012...
>
> I have 32 bit VM and I have SYSVIPC enabled in the configuration...
>
> - Dmitry

It seems "semget" is missing from: arch/x86/syscalls/syscall_32.tbl
But it presents in: arch/x86/syscalls/syscall_64.tbl

Is it a bug then?

- Dmitry

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

"Bryn M. Reeves" 01-19-2012 05:06 PM

dmsetup fails on latest kernel
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/19/2012 04:10 PM, Kasatkin, Dmitry wrote:
> It seems "semget" is missing from:
> arch/x86/syscalls/syscall_32.tbl But it presents in:
> arch/x86/syscalls/syscall_64.tbl
>
> Is it a bug then?

Maybe; I noticed that too but it's also missing in the old x86
unistd_32.h.

I thought Linux only provided the ipc(2) call - glibc sources seem to
confirm that (sysdeps/unix/sysv/linux/semget.c).

sys_sem* and friends are present in include/asm-generic/unistd.h so
maybe these values just need to be propagated to syscall_32.tbl?

Actually there's a bunch of SysV IPC calls defined in syscall_64.tbl
that are not present in syscall_32.tbl:

$ egrep 'shm|sem|msg[a-z]' arch/x86/syscalls/syscall_32.tbl
$ egrep 'shm|sem|msg[a-z]' arch/x86/syscalls/syscall_64.tbl
29 64 shmget sys_shmget
30 64 shmat sys_shmat
31 64 shmctl sys_shmctl
64 64 semget sys_semget
65 64 semop sys_semop
66 64 semctl sys_semctl
67 64 shmdt sys_shmdt
68 64 msgget sys_msgget
69 64 msgsnd sys_msgsnd
70 64 msgrcv sys_msgrcv
71 64 msgctl sys_msgctl
220 64 semtimedop sys_semtimedop

But sys_ipc is there:

$ grep sys_ipc arch/x86/syscalls/syscall_32.tbl
117 i386 ipc sys_ipc sys32_ipc

Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8YW7wACgkQ6YSQoMYUY97S0gCfTZOFMENOiV rm5jIprhcYkmDJ
Pu4AnRUkUVwyZkgUG9DAcAfdmwR7kX2N
=Bnwq
-----END PGP SIGNATURE-----

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Linus Torvalds 01-19-2012 06:05 PM

dmsetup fails on latest kernel
 
On Thu, Jan 19, 2012 at 7:56 AM, Kasatkin, Dmitry
<dmitry.kasatkin@intel.com> wrote:
> On Thu, Jan 19, 2012 at 3:02 PM, Kasatkin, Dmitry
> <dmitry.kasatkin@intel.com> wrote:
>> Hi,
>>
>> (subject added)
>>
>> I rebased on the stop of latest mainline tree and now dmsetup fails...
>> It says: "Failed to create notification semaphore: Function not implemented".
>> I run strace and saw that dmsetup uses "semget" which returns -ENOSYS...
>>
>> It works on
>> 122804ecb59493fbb4d31b3ba9ac59faaf45276f
>>
>> but does not work on
>> ccb19d263fd1c9e34948e2158c53eacbff369344
>>
>> Any ideas?
>>
>> - Dmitry
>
> Hi,
>
> I have bisected the problem...
>
> It is introduced by this commit:
>
> 303395ac3bf3e2cb488435537d416bc840438fcb is the first bad commit
> commit 303395ac3bf3e2cb488435537d416bc840438fcb
> Author: H. Peter Anvin <hpa@linux.intel.com>
> Date: * Fri Nov 11 16:07:41 2011 -0800
>
> * *x86: Generate system call tables and unistd_*.h from tables

Interesting. I just munged the old pre-merge

arch/x86/kernel/syscall_table_32.S

and the new

arch/x86/syscalls/syscall_32.tbl

with some trivial shell scripting, and they are definitely identical.

So the tables look like they match 1:1.

The compat tables match too, except the new list contains the entry
for bdflush (134), but that's a legacy thing that doesn't matter.

I wonder what else could be going on. Wrong number of system calls
check? Peter, any ideas?

Linus

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

"H. Peter Anvin" 01-19-2012 06:58 PM

dmsetup fails on latest kernel
 
On 01/19/2012 11:05 AM, Linus Torvalds wrote:


Hi,

I have bisected the problem...

It is introduced by this commit:

303395ac3bf3e2cb488435537d416bc840438fcb is the first bad commit
commit 303395ac3bf3e2cb488435537d416bc840438fcb
Author: H. Peter Anvin<hpa@linux.intel.com>
Date: Fri Nov 11 16:07:41 2011 -0800

x86: Generate system call tables and unistd_*.h from tables


Interesting. I just munged the old pre-merge

arch/x86/kernel/syscall_table_32.S

and the new

arch/x86/syscalls/syscall_32.tbl

with some trivial shell scripting, and they are definitely identical.

So the tables look like they match 1:1.

The compat tables match too, except the new list contains the entry
for bdflush (134), but that's a legacy thing that doesn't matter.

I wonder what else could be going on. Wrong number of system calls
check? Peter, any ideas?



Not off the top of my head. I will try to reproduce this and see what
the problem is. Dmitry, what version of binutils and gcc are you using?
It could be that there is a toolchain problem.


-hpa


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

"H. Peter Anvin" 01-19-2012 06:58 PM

dmsetup fails on latest kernel
 
On 01/19/2012 10:06 AM, Bryn M. Reeves wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/19/2012 04:10 PM, Kasatkin, Dmitry wrote:

It seems "semget" is missing from:
arch/x86/syscalls/syscall_32.tbl But it presents in:
arch/x86/syscalls/syscall_64.tbl

Is it a bug then?


Maybe; I noticed that too but it's also missing in the old x86
unistd_32.h.

I thought Linux only provided the ipc(2) call - glibc sources seem to
confirm that (sysdeps/unix/sysv/linux/semget.c).

sys_sem* and friends are present in include/asm-generic/unistd.h so
maybe these values just need to be propagated to syscall_32.tbl?

Actually there's a bunch of SysV IPC calls defined in syscall_64.tbl
that are not present in syscall_32.tbl:

$ egrep 'shm|sem|msg[a-z]' arch/x86/syscalls/syscall_32.tbl
$ egrep 'shm|sem|msg[a-z]' arch/x86/syscalls/syscall_64.tbl
29 64 shmget sys_shmget
30 64 shmat sys_shmat
31 64 shmctl sys_shmctl
64 64 semget sys_semget
65 64 semop sys_semop
66 64 semctl sys_semctl
67 64 shmdt sys_shmdt
68 64 msgget sys_msgget
69 64 msgsnd sys_msgsnd
70 64 msgrcv sys_msgrcv
71 64 msgctl sys_msgctl
220 64 semtimedop sys_semtimedop

But sys_ipc is there:

$ grep sys_ipc arch/x86/syscalls/syscall_32.tbl
117 i386 ipc sys_ipc sys32_ipc



No, the i386 ABI uses several system call multiplexes (sys_ipc,
sys_socketcall) which are deprecated for new ABIs. x86-64 and other new
ABIs use plain system calls. Thus, this is all as one should expect;
the right thing to do is to compare against the old 32-bit system call
table.


-hpa

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

"H. Peter Anvin" 01-19-2012 07:13 PM

dmsetup fails on latest kernel
 
Could you please send me:

a) your full strace;
b) arch/x86/kernel/syscall_32.o from your build?

-hpa

On 01/19/2012 07:56 AM, Kasatkin, Dmitry wrote:
> On Thu, Jan 19, 2012 at 3:02 PM, Kasatkin, Dmitry
> <dmitry.kasatkin@intel.com> wrote:
>> Hi,
>>
>> (subject added)
>>
>> I rebased on the stop of latest mainline tree and now dmsetup fails...
>> It says: "Failed to create notification semaphore: Function not implemented".
>> I run strace and saw that dmsetup uses "semget" which returns -ENOSYS...
>>
>> It works on
>> 122804ecb59493fbb4d31b3ba9ac59faaf45276f
>>
>> but does not work on
>> ccb19d263fd1c9e34948e2158c53eacbff369344
>>
>> Any ideas?
>>
>> - Dmitry
>
> Hi,
>
> I have bisected the problem...
>
> It is introduced by this commit:
>
> 303395ac3bf3e2cb488435537d416bc840438fcb is the first bad commit
> commit 303395ac3bf3e2cb488435537d416bc840438fcb
> Author: H. Peter Anvin <hpa@linux.intel.com>
> Date: Fri Nov 11 16:07:41 2011 -0800
>
> x86: Generate system call tables and unistd_*.h from tables
>
>
> It came from: Merge branch 'x86-syscall-for-linus' of
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> Was on 17.01.2012...
>
> I have 32 bit VM and I have SYSVIPC enabled in the configuration...
>
> - Dmitry


--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Linus Torvalds 01-19-2012 07:17 PM

dmsetup fails on latest kernel
 
On Thu, Jan 19, 2012 at 12:13 PM, H. Peter Anvin <hpa@zytor.com> wrote:
> Could you please send me:
>
> a) your full strace;
> b) arch/x86/kernel/syscall_32.o from your build?

Btw, the strace before-and-after (working vs nonworking) would
probably be useful. They aren't easily comparable (all the random
pointers change depending on allocations etc), but some scripting and
editing out pointer values might make the difference be obvious.

Linus

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


All times are GMT. The time now is 11:55 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.