DCIT / perl-CryptX

https://metacpan.org/pod/CryptX
Other
35 stars 23 forks source link

Not a bug: looking for info about CyptX and real time signals #23

Closed jamesrleu closed 8 years ago

jamesrleu commented 8 years ago

Same application as my previous issue, but now moved to a linux container. Inside the container trying to decypt data perl process dies, strace of the issue shows, outside the container, no issues.

clone(child_stack=0x105d4570, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND) = 85956 write(14, "pv[\r\5\0\0\0\273dv\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\334"..., 148) = 148 rt_sigprocmask(SIGSETMASK, NULL, [RTMIN], 8) = 0 write(14, "\240\20\367\0\0\0\0\0\0\0\0000\214\203\366\320\315\216"..., 148) = 148 rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0 rt_sigsuspend([]) = ? ERESTARTNOHAND (To be restarted) --- SIGRTMIN (Unknown signal 32) ---

Which makes no sense to me because I do not think CryptX uses threads or forks but the clone system call is only used by fork() and threads. Also, signal 32 is not a standard signal and is not handled, so ERESTARTNOHAND requires the process to die if the signal is not handled.

Bypassing the decryption code and the application continues to run, just discards the data.

Just wondering if you have seen anything like this or if can validate my assumption about that CyptX does not use threads or fork, in which case I will hunt down where the clone() system call is coming from.

Thank you for your time and for your great software

karel-m commented 8 years ago

Hi, I am not aware of any CryptX limitations related to forking or threads, There might be some but it is not very likely.

jamesrleu commented 8 years ago

Just to close the loop.

User input resulted in my code specifying SHA instead of SHA1 when creating an HMAC object. This caused CryptX to go off into the weeds, once I cleaned up the user input CryptX worked great. Thank you for the wonderful all-in-one Crypt package!

On Wed, Oct 12, 2016 at 12:23:11AM -0700, karel-m wrote:

Hi, I am not aware of any CryptX limitations related to forking or threads, There might be some but it is not very likely.

You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/DCIT/perl-CryptX/issues/23#issuecomment-253138586

James R. Leu jleu@mindspring.com

karel-m commented 8 years ago

Thanks for feedback. I am closing this issue.