View Issue Details

IDProjectCategoryView StatusLast Update
0001295XdebugUncategorizedpublic2016-11-12 16:53
Reporterpkunyavskiy Assigned Toderick  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSDebianOS Version7
Product Version2.2.7 
Fixed in Version2.5.0RC1 
Summary0001295: Apache crashes (SIGSEGV) when trying to establish connection when sockfd is large
Description

In function xdebug_create_socket, you are using select function.

If socket returns sockfd greater than or equals to 1024, select and other FD_ macroses will put garbage on system stack, which causes apache to SIGSEGV.
Probably, it's actual to all versions later (current github version 2bfc4982b40622ea792da276f2d1c3bc8b6e8f98 has this bug).

Steps To Reproduce

Probably, have too many sites (with many ports to listen) on single apache.

Additional Information

Solution is simple: replace select with poll or epoll.

TagsNo tags attached.
Operating System
PHP Version5.3.7

Activities

derick

2016-05-10 19:44

administrator   ~0003589

Fixed in master on GitHub, as the code now uses poll() instead of select, which doesn't have this FD limit. As that PR also introduces a new feature, this won't be part of the 2.4.x series.

Issue History

Date Modified Username Field Change
2016-04-18 18:05 pkunyavskiy New Issue
2016-05-10 19:44 derick Note Added: 0003589
2016-05-10 19:44 derick Status new => closed
2016-05-10 19:44 derick Assigned To => derick
2016-05-10 19:44 derick Resolution open => fixed
2016-05-10 19:44 derick Fixed in Version => 2.5.0dev
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2016-11-12 16:53 derick Fixed in Version 2.5.0dev => 2.5.0RC1
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized