All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] cryptsetup  luksOpen  hang on semop
@ 2015-06-09  1:15 laxmikanth reddy
  2015-06-09  5:37 ` Milan Broz
  0 siblings, 1 reply; 4+ messages in thread
From: laxmikanth reddy @ 2015-06-09  1:15 UTC (permalink / raw)
  To: dm-crypt@saout.de; +Cc: LAXMIKANTHA REDDY PONNURU

[-- Attachment #1: Type: text/plain, Size: 2428 bytes --]

Hi Team,
Wee are working embedded system bringup with custom build kernel 3.10.65 version. 
and kernel version is 3.10.65.
Here, we are trying to mount the encrypted disk, when udev rule match the uevent,
with "cryptsetup luksOpen ..", and it is getting hang at semop. cryptsetup 1.6.1.Can you please share light on, what could be the possible reasons for this issue? 
Appriciate your help and any pointers, to debug this issue. Thanks in advance. 
Foloowing is the starce log, for "cryptsetup luksOpen ..":
bash-4.2# strace /sbin/cryptsetup --debug --batch-mode luksOpen /dev/bootdisk2>
execve("/sbin/cryptsetup", ["/sbin/cryptsetup", "--debug", "--batch-mode", "luksOpen", "/dev/bootdisk2", "NVRAM", "--key-file", "/varied/nv_bb"], [/* 12 vars */]) = 0......open("/dev/bootdisk2", O_RDONLY|O_LARGEFILE) = 6
fstat64(6, {st_mode=S_IFBLK|0640, st_rdev=makedev(8, 2), ...}) = 0
ioctl(6, BLKSSZGET, 512)                = 0
close(6)                                = 0stat64("/dev/bootdisk2", {st_mode=S_IFBLK|0640, st_rdev=makedev(8, 2), ...}) = 0
open("/dev/bootdisk2", O_RDWR|O_LARGEFILE) = 6
ioctl(6, BLKROGET, 0)                   = 0
ioctl(6, BLKGETSIZE64, 35651584)        = 0
close(6)                                = 0
open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 6
read(6, "\265\376", 2)                  = 2
semget(0xd4dfeb5, 1, IPC_CREAT|IPC_EXCL|0600) = 163845
semctl(163845, 0, IPC_64|SETVAL, 0xffb176c8) = 0
semctl(163845, 0, IPC_64|GETVAL, 0xffb176c8) = 1
close(6)                                = 0
semop(163845, {{0, 1, 0}}, 1)           = 0
semctl(163845, 0, IPC_64|GETVAL, 0xffb17728) = 2
open("/dev/bootdisk2", O_RDONLY|O_LARGEFILE) = 6
ioctl(6, BLKRAGET, 256)                 = 0
close(6)                                = 0
ioctl(5, DM_DEV_CREATE, 0x885a2a8)      = 0
ioctl(5, DM_TABLE_LOAD, 0x885a2a8)      = 0
ioctl(5, DM_DEV_SUSPEND, 0x885a2a8)     = 0
semget(0xd4dfeb5, 1, 0)                 = 163845
semctl(163845, 0, IPC_64|GETVAL, 0xffb176f8) = 2
semop(163845, {{0, -1, IPC_NOWAIT}}, 1) = 0
semop(163845, {{0, 0, 0}}, 1                             >>>>>>>>system hangs on this semop
Thanks
Laxmikanth


[-- Attachment #2: Type: text/html, Size: 4294 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dm-crypt] cryptsetup  luksOpen  hang on semop
  2015-06-09  1:15 [dm-crypt] cryptsetup luksOpen hang on semop laxmikanth reddy
@ 2015-06-09  5:37 ` Milan Broz
  2015-06-09  5:59   ` Arno Wagner
  0 siblings, 1 reply; 4+ messages in thread
From: Milan Broz @ 2015-06-09  5:37 UTC (permalink / raw)
  To: laxmikanth reddy, dm-crypt@saout.de


On 06/09/2015 03:15 AM, laxmikanth reddy wrote:
> Hi Team,
> Wee are working embedded system bringup with custom build kernel 3.10.65 version.
> and kernel version is 3.10.65.
> Here, we are trying to mount the encrypted disk, when udev rule match the uevent,
> with "cryptsetup luksOpen ..", and it is getting hang at semop. cryptsetup 1.6.1.
> Can you please share light on, what could be the possible reasons for this issue?
> Appriciate your help and any pointers, to debug this issue. Thanks in advance.

Maybe you should start with reading FAQ and archive, similar problem was here
just few weeks ago, please read this thread
http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/8049

I think your system is just compiled with udev support but missing mandatory
device mapper udev rules (libdevmapper library and udev rules are part of lvm2 package,
cryptsetup depends on it).

Also please use new version (1.6.7) there were some bugfixes, 1.6.1 is pretty old version.

> Foloowing is the starce log, for "cryptsetup luksOpen ..":
> 
> bash-4.2# strace /sbin/cryptsetup --debug --batch-mode luksOpen /dev/bootdisk2>
> execve("/sbin/cryptsetup", ["/sbin/cryptsetup", "--debug", "--batch-mode", "luksOpen", "/dev/bootdisk2", "NVRAM", "--key-file", "/varied/nv_bb"], [/* 12 vars */]) = 0

Please better always paste --debug log (which is sanitized), we need strace only
if requested (see FAQ).

Milan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dm-crypt] cryptsetup  luksOpen  hang on semop
  2015-06-09  5:37 ` Milan Broz
@ 2015-06-09  5:59   ` Arno Wagner
  2015-06-15  2:22     ` laxmikanth reddy
  0 siblings, 1 reply; 4+ messages in thread
From: Arno Wagner @ 2015-06-09  5:59 UTC (permalink / raw)
  To: dm-crypt

On Tue, Jun 09, 2015 at 07:37:12 CEST, Milan Broz wrote:
> 
> On 06/09/2015 03:15 AM, laxmikanth reddy wrote:
> > Hi Team,
> > Wee are working embedded system bringup with custom build kernel 3.10.65 version.
> > and kernel version is 3.10.65.
> > Here, we are trying to mount the encrypted disk, when udev rule match the uevent,
> > with "cryptsetup luksOpen ..", and it is getting hang at semop. cryptsetup 1.6.1.
> > Can you please share light on, what could be the possible reasons for this issue?
> > Appriciate your help and any pointers, to debug this issue. Thanks in advance.
> 
> Maybe you should start with reading FAQ and archive, similar problem was here
> just few weeks ago, please read this thread
> http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/8049
> 

FAQ is here:
https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions/

Mailing List archive is given in FAQ ite, 1.7

Without having time to look at the defaults of your issue, usually
these lockups are causes by the other side having problems (as 
Milan explains below). Automagic is nice when it works, but a pain
to debug when it does not.

Note that udev/LVM2 is not part of the cryptsetup project.

Regards,
Arno

> I think your system is just compiled with udev support but missing mandatory
> device mapper udev rules (libdevmapper library and udev rules are part of 
> lvm2 package, cryptsetup depends on it).
> 
> Also please use new version (1.6.7) there were some bugfixes, 1.6.1 is pretty old version.
> 
> > Foloowing is the starce log, for "cryptsetup luksOpen ..":
> > 
> > bash-4.2# strace /sbin/cryptsetup --debug --batch-mode luksOpen /dev/bootdisk2>
> > execve("/sbin/cryptsetup", ["/sbin/cryptsetup", "--debug", "--batch-mode", "luksOpen", "/dev/bootdisk2", "NVRAM", "--key-file", "/varied/nv_bb"], [/* 12 vars */]) = 0
> 
> Please better always paste --debug log (which is sanitized), we need strace only
> if requested (see FAQ).
> 
> Milan
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dm-crypt] cryptsetup  luksOpen  hang on semop
  2015-06-09  5:59   ` Arno Wagner
@ 2015-06-15  2:22     ` laxmikanth reddy
  0 siblings, 0 replies; 4+ messages in thread
From: laxmikanth reddy @ 2015-06-15  2:22 UTC (permalink / raw)
  To: Arno Wagner, dm-crypt@saout.de

[-- Attachment #1: Type: text/plain, Size: 2900 bytes --]

Thanks Milan and Arno for quick help. yes, we had missing udev rules. including them fix'es the problem.
ThanksLaxmikanth 


     On Monday, June 8, 2015 10:59 PM, Arno Wagner <arno@wagner.name> wrote:
   

 On Tue, Jun 09, 2015 at 07:37:12 CEST, Milan Broz wrote:
> 
> On 06/09/2015 03:15 AM, laxmikanth reddy wrote:
> > Hi Team,
> > Wee are working embedded system bringup with custom build kernel 3.10.65 version.
> > and kernel version is 3.10.65.
> > Here, we are trying to mount the encrypted disk, when udev rule match the uevent,
> > with "cryptsetup luksOpen ..", and it is getting hang at semop. cryptsetup 1.6.1.
> > Can you please share light on, what could be the possible reasons for this issue?
> > Appriciate your help and any pointers, to debug this issue. Thanks in advance.
> 
> Maybe you should start with reading FAQ and archive, similar problem was here
> just few weeks ago, please read this thread
> http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/8049
> 

FAQ is here:
https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions/

Mailing List archive is given in FAQ ite, 1.7

Without having time to look at the defaults of your issue, usually
these lockups are causes by the other side having problems (as 
Milan explains below). Automagic is nice when it works, but a pain
to debug when it does not.

Note that udev/LVM2 is not part of the cryptsetup project.

Regards,
Arno

> I think your system is just compiled with udev support but missing mandatory
> device mapper udev rules (libdevmapper library and udev rules are part of 
> lvm2 package, cryptsetup depends on it).
> 
> Also please use new version (1.6.7) there were some bugfixes, 1.6.1 is pretty old version.
> 
> > Foloowing is the starce log, for "cryptsetup luksOpen ..":
> > 
> > bash-4.2# strace /sbin/cryptsetup --debug --batch-mode luksOpen /dev/bootdisk2>
> > execve("/sbin/cryptsetup", ["/sbin/cryptsetup", "--debug", "--batch-mode", "luksOpen", "/dev/bootdisk2", "NVRAM", "--key-file", "/varied/nv_bb"], [/* 12 vars */]) = 0
> 
> Please better always paste --debug log (which is sanitized), we need strace only
> if requested (see FAQ).
> 
> Milan
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

-- 
Arno Wagner,    Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier
_______________________________________________
dm-crypt mailing list
dm-crypt@saout.de
http://www.saout.de/mailman/listinfo/dm-crypt


  

[-- Attachment #2: Type: text/html, Size: 5648 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-15  2:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-09  1:15 [dm-crypt] cryptsetup luksOpen hang on semop laxmikanth reddy
2015-06-09  5:37 ` Milan Broz
2015-06-09  5:59   ` Arno Wagner
2015-06-15  2:22     ` laxmikanth reddy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.