[GH-ISSUE #78] Segmentation fault on Debian Wheezy #58

Closed
opened 2026-02-26 09:35:29 +03:00 by kerem · 6 comments
Owner

Originally created by @aomader on GitHub (Apr 24, 2014).
Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/78

Hey fellas,

I'm happily using ViMbAdmin but I recently encountered a problem concerning segmentation faults.
Since 04/22 I run into segmentation faults trying to access vba. I think it might be caused by the recent update of OpenSSL (openssl:amd64 1.0.1e-2+deb7u), because that's basically the only thing that changed.
Any hints on how to debug the problem? The current output is not helpful at all:

$  php -S localhost:8080 -t public
PHP 5.4.4-14+deb7u8 Development Server started at Thu Apr 24 13:52:26 2014
Listening on localhost:8080
Document root is /srv/www/vimbadmin/public
Press Ctrl-C to quit.
[Thu Apr 24 13:52:28 2014] 127.0.0.1:43980 [302]: /
zsh: segmentation fault  php -S localhost:8080 -t public
Originally created by @aomader on GitHub (Apr 24, 2014). Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/78 Hey fellas, I'm happily using ViMbAdmin but I recently encountered a problem concerning segmentation faults. Since 04/22 I run into segmentation faults trying to access vba. I think it might be caused by the recent update of OpenSSL (openssl:amd64 1.0.1e-2+deb7u), because that's basically the only thing that changed. Any hints on how to debug the problem? The current output is not helpful at all: ``` $ php -S localhost:8080 -t public PHP 5.4.4-14+deb7u8 Development Server started at Thu Apr 24 13:52:26 2014 Listening on localhost:8080 Document root is /srv/www/vimbadmin/public Press Ctrl-C to quit. [Thu Apr 24 13:52:28 2014] 127.0.0.1:43980 [302]: / zsh: segmentation fault php -S localhost:8080 -t public ```
kerem closed this issue 2026-02-26 09:35:29 +03:00
Author
Owner

@barryo commented on GitHub (Apr 24, 2014):

Sorry - seg fault is more of an os issue and not a ViMbAdmin issue 😇

<!-- gh-comment-id:41277680 --> @barryo commented on GitHub (Apr 24, 2014): Sorry - seg fault is more of an os issue and not a ViMbAdmin issue :innocent:
Author
Owner

@aomader commented on GitHub (Apr 24, 2014):

So a Null-Pointer Exception in C is more of a language issue but a bug in the software?

Sine all other PHP-based software runs just fine, it's definitely something with ViMbAdmin. Nevertheless I'm willing to look into it and debug it to find the source of the problem, yet I need some hints how to do so, since my profession has nothing to with PHP. So although you don't feel responsible for this kind of problem it would be really helpful if you could tell me how I could come to the root of all evil.

<!-- gh-comment-id:41326545 --> @aomader commented on GitHub (Apr 24, 2014): So a Null-Pointer Exception in C is more of a language issue but a bug in the software? Sine all other PHP-based software runs just fine, it's definitely something with ViMbAdmin. Nevertheless I'm willing to look into it and debug it to find the source of the problem, yet I need some hints how to do so, since my profession has nothing to with PHP. So although you don't feel responsible for this kind of problem it would be really helpful if you could tell me how I could come to the root of all evil.
Author
Owner
<!-- gh-comment-id:41372037 --> @barryo commented on GitHub (Apr 25, 2014): As we can't reproduce, we can't try to fix ourselves. Some useful links: - http://markusperl.blogspot.co.uk/2012/11/php-phpunit-segmentation-fault.html - http://stackoverflow.com/questions/13079513/how-do-i-diagnose-this-php-segmentation-fault - https://www.google.ie/search?q=php+segmentation+fault
Author
Owner

@aomader commented on GitHub (Apr 26, 2014):

strace reveals the following:

gettimeofday({1398496216, 932974}, NULL) = 0
gettimeofday({1398496216, 933018}, NULL) = 0
lseek(6, 0, SEEK_SET)                   = 0
write(6, "Application|a:1:{s:11:\"initializ"..., 41) = 41
close(6)                                = 0
gettimeofday({1398496216, 933298}, NULL) = 0
gettimeofday({1398496216, 933336}, NULL) = 0
gettimeofday({1398496216, 933374}, NULL) = 0
gettimeofday({1398496216, 933413}, NULL) = 0
gettimeofday({1398496216, 933453}, NULL) = 0
gettimeofday({1398496216, 933647}, NULL) = 0
gettimeofday({1398496216, 934463}, NULL) = 0
gettimeofday({1398496216, 934503}, NULL) = 0
gettimeofday({1398496216, 934557}, NULL) = 0
chdir("/srv/www/vimbadmin")             = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffce5e5e80) = -1 ENOTTY (Inappropriate ioctl for device)
gettimeofday({1398496216, 934764}, NULL) = 0
write(2, "[Sat Apr 26 09:10:16 2014] 127.0"..., 52[Sat Apr 26 09:10:16 2014] 127.0.0.1:44208 [302]: /
) = 52
gettimeofday({1398496216, 934880}, NULL) = 0
gettimeofday({1398496216, 934938}, NULL) = 0
gettimeofday({1398496216, 934978}, NULL) = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
sendto(5, "HTTP/1.1 302 Found\r\nHost: localh"..., 342, 0, NULL, 0) = 342
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
zsh: segmentation fault  strace php -S localhost:8080 -t public

Using gdb I can print the stacktrace:

(gdb) bt
#0  0x0000000000678266 in ?? ()
#1  0x0000000000678430 in ?? ()
#2  0x0000000000694bf8 in ?? ()
#3  0x00000000006ad2d5 in zend_hash_apply ()
#4  0x000000000069557f in destroy_zend_class ()
#5  0x00000000006955bf in ?? ()
#6  0x0000000000695444 in destroy_zend_class ()
#7  0x00000000006aba55 in ?? ()
#8  0x00000000006ad591 in zend_hash_reverse_apply ()
#9  0x000000000069083f in ?? ()
#10 0x000000000069f2b5 in ?? ()
#11 0x000000000063eb7a in php_request_shutdown ()
#12 0x000000000075092f in ?? ()
#13 0x00000000007510be in ?? ()
#14 0x000000000075198a in ?? ()
#15 0x0000000000430f9a in ?? ()
#16 0x00007ffff5161ead in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#17 0x000000000043133d in _start ()

The xdebug output is way to long, therefore I uploaded it here.

Is that of any help for you? I don't really see what might be the problem, so if you could spare a few minutes and look at it I would be really grateful.

<!-- gh-comment-id:41462158 --> @aomader commented on GitHub (Apr 26, 2014): `strace` reveals the following: ``` gettimeofday({1398496216, 932974}, NULL) = 0 gettimeofday({1398496216, 933018}, NULL) = 0 lseek(6, 0, SEEK_SET) = 0 write(6, "Application|a:1:{s:11:\"initializ"..., 41) = 41 close(6) = 0 gettimeofday({1398496216, 933298}, NULL) = 0 gettimeofday({1398496216, 933336}, NULL) = 0 gettimeofday({1398496216, 933374}, NULL) = 0 gettimeofday({1398496216, 933413}, NULL) = 0 gettimeofday({1398496216, 933453}, NULL) = 0 gettimeofday({1398496216, 933647}, NULL) = 0 gettimeofday({1398496216, 934463}, NULL) = 0 gettimeofday({1398496216, 934503}, NULL) = 0 gettimeofday({1398496216, 934557}, NULL) = 0 chdir("/srv/www/vimbadmin") = 0 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffce5e5e80) = -1 ENOTTY (Inappropriate ioctl for device) gettimeofday({1398496216, 934764}, NULL) = 0 write(2, "[Sat Apr 26 09:10:16 2014] 127.0"..., 52[Sat Apr 26 09:10:16 2014] 127.0.0.1:44208 [302]: / ) = 52 gettimeofday({1398496216, 934880}, NULL) = 0 gettimeofday({1398496216, 934938}, NULL) = 0 gettimeofday({1398496216, 934978}, NULL) = 0 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0 sendto(5, "HTTP/1.1 302 Found\r\nHost: localh"..., 342, 0, NULL, 0) = 342 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ zsh: segmentation fault strace php -S localhost:8080 -t public ``` Using `gdb` I can print the stacktrace: ``` (gdb) bt #0 0x0000000000678266 in ?? () #1 0x0000000000678430 in ?? () #2 0x0000000000694bf8 in ?? () #3 0x00000000006ad2d5 in zend_hash_apply () #4 0x000000000069557f in destroy_zend_class () #5 0x00000000006955bf in ?? () #6 0x0000000000695444 in destroy_zend_class () #7 0x00000000006aba55 in ?? () #8 0x00000000006ad591 in zend_hash_reverse_apply () #9 0x000000000069083f in ?? () #10 0x000000000069f2b5 in ?? () #11 0x000000000063eb7a in php_request_shutdown () #12 0x000000000075092f in ?? () #13 0x00000000007510be in ?? () #14 0x000000000075198a in ?? () #15 0x0000000000430f9a in ?? () #16 0x00007ffff5161ead in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 #17 0x000000000043133d in _start () ``` The `xdebug` output is way to long, therefore I uploaded it [here](https://paste.xinu.at/KOdDJ/). Is that of any help for you? I don't really `see` what might be the problem, so if you could spare a few minutes and look at it I would be really grateful.
Author
Owner

@barryo commented on GitHub (Apr 26, 2014):

I've had a look but nothing jumps out at me, sorry. In my experience, segmentation faults come down to:

  • bad coding such as infinite recursion / loops / etc. As you are the only one reporting such a problem, it's most likely not this issue.
  • a unique set of code / input data - I have no way to check this. Also, if this is happening on a fresh install then it's also not this issue.
  • badly compiled PHP extensions / mismatched versions / etc. Possibly?

The xdebug and strace suggests the request completed - looks like it's sending a 302 request to redirect to the authentication page before it craps out. This would lean me in the direction of a platform issue (badly compiled PHP extensions / mismatched versions / etc) rather than a ViMbAdmin issue.

<!-- gh-comment-id:41462586 --> @barryo commented on GitHub (Apr 26, 2014): I've had a look but nothing jumps out at me, sorry. In my experience, segmentation faults come down to: - bad coding such as infinite recursion / loops / etc. As you are the only one reporting such a problem, it's most likely not this issue. - a unique set of code / input data - I have no way to check this. Also, if this is happening on a fresh install then it's also not this issue. - badly compiled PHP extensions / mismatched versions / etc. Possibly? The xdebug and strace suggests the request completed - looks like it's sending a 302 request to redirect to the authentication page before it craps out. This would lean me in the direction of a platform issue (badly compiled PHP extensions / mismatched versions / etc) rather than a ViMbAdmin issue.
Author
Owner

@fwosar commented on GitHub (Nov 7, 2014):

I ran into similar issues. The problem in my case was the php5-apc module. Removing it prevented further crashes from happening. It appears Wheezy's APC really doesn't like some of the frameworks ViMbAdmin uses.

<!-- gh-comment-id:62119708 --> @fwosar commented on GitHub (Nov 7, 2014): I ran into similar issues. The problem in my case was the php5-apc module. Removing it prevented further crashes from happening. It appears Wheezy's APC really doesn't like some of the frameworks ViMbAdmin uses.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ViMbAdmin-opensolutions#58
No description provided.