LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   cryptsetup-segmentation fault on Slackware-12.0 - 2.6.23.14 (http://www.linuxquestions.org/questions/slackware-14/cryptsetup-segmentation-fault-on-slackware-12-0-2-6-23-14-a-616208/)

dlinux 01-25-2008 03:25 AM

cryptsetup-segmentation fault on Slackware-12.0 - 2.6.23.14
 
Today,unexpectedly my cryptsetup started to segfault with the command:
Quote:

cryptsetup luksOpen /dev/sda1 hardsafe
it just spits segfault.The output from dmesg:
Quote:

cryptsetup[2869]: segfault at b7eb62ef eip b7ecdaa2 esp bff37210 error 7
cryptsetup[2870]: segfault at b7eb52ef eip b7eccaa2 esp bfb93670 error 7
cryptsetup[2871]: segfault at b7ef12ef eip b7f08aa2 esp bfc3f720 error 7
cryptsetup[2872]: segfault at b7ecf2ef eip b7ee6aa2 esp bfa114f0 error 7
cryptsetup[2874]: segfault at b7f662ef eip b7f7daa2 esp bf8c23a0 error 7
5 errors from the 5 times i tried.Anybody have a clue what's wrong?
Clearly a bug.

ps: i have sucessfuly used cryptsetup with the same 2.6.23.14 kernel before.

nevermind,i already figured out the problem with the help of strace:

Quote:

open("/dev/sda1", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 3106 detached


reed68 01-29-2008 03:56 PM

Hi,

Out of curiosity could you explain how you fixed it. I don't understand how you figured it out by what you wrote.

Thank you.

dlinux 01-30-2008 05:42 AM

Quote:

Originally Posted by reed68 (Post 3039195)
Hi,

Out of curiosity could you explain how you fixed it. I don't understand how you figured it out by what you wrote.

Thank you.


the problem was that the block device /dev/sda1 didn't exist at the moment
i tried that cryptsetup command(which you can see by the failed open(2) syscall):

Quote:

open("/dev/sda1", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
I just unplugged the usb cable and plugged it again(external hard drive) to get it working.
type
Quote:

man 2 open
in a shell for more information.

I still wonder why it did segfault,the open syscall failed cryptsetup should have quit immediately.


All times are GMT -5. The time now is 05:33 AM.