Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault, while loading large static contents in daemon mode #1205

Closed
zkde8dr opened this issue Oct 22, 2013 · 5 comments
Closed

Comments

@zkde8dr
Copy link

zkde8dr commented Oct 22, 2013

This happen in daemon mode, but not in server mode.

Here is the error.log:
..loaded 537696793 bytes of png files
..loaded 2533302 bytes of html files
..loaded 199401134 bytes of jpg files
..loaded 1695533 bytes of css files
..loaded 210570 bytes of jpeg files
loaded 761202465 bytes of static content in total
loading static content took 0'01" (1404954 us) wall time
page server started
admin server started
all servers started
receiving
Core dumped: Segmentation fault

and the coredump message is:
(gdb) bt
#0 0x0000000000e4892e in HPHP::FileCache::adviseOutMemory() ()
#1 0x0000000000ca9d22 in HPHP::HttpRequestHandler::handleRequest(HPHP::Transport*) ()
#2 0x0000000000cb1fde in HPHP::ServerWorkerstd::shared_ptr<HPHP::LibEventJob, HPHP::LibEventTransportTraits>::doJobImpl(std::shared_ptrHPHP::LibEventJob, bool) ()
#3 0x0000000000cb2228 in HPHP::ServerWorkerstd::shared_ptr<HPHP::LibEventJob, HPHP::LibEventTransportTraits>::doJob(std::shared_ptrHPHP::LibEventJob) ()
#4 0x0000000000cb18f6 in HPHP::JobQueueWorkerstd::shared_ptr<HPHP::LibEventJob, true, false, HPHP::JobQueueDropVMStack>::start() ()
#5 0x0000000000e39787 in HPHP::AsyncFuncImpl::ThreadFunc(void*) ()
#6 0x000000318b207851 in start_thread () from /lib64/libpthread.so.0
#7 0x000000318aee767d in clone () from /lib64/libc.so.6

@zkde8dr
Copy link
Author

zkde8dr commented Oct 22, 2013

Sorry, also happened in server mode

@letharion
Copy link

While it's always desirable to avoid segmentation faults, my first guess would be that you are simply running out of memory, and it's probably not trivial to make everything behave nicely if there's not more memory.

What happens when you run the same thing with zend, and have you verified whether or not you have more available ram?

How can the problem be reproduced?

@scannell
Copy link
Contributor

We are unfortunately not so resilient to OOM conditions at the moment. My first question is along the lines of @letharion's -- did you exceed the amount of available memory? I'm not sure we've gotten up to 700MB but we've definitely run this code with O(100MB) of static content without issues to date. Was m_addr bad? (Do you know which pointer access caused the segfault?) If the call to mmap fails it should set m_addr to -1 and throw so something seems odd here.

@ptarjan
Copy link
Contributor

ptarjan commented Dec 7, 2013

Can you try running us through FastCGI instead? I'd rather get out of the server business.

@ptarjan ptarjan closed this as completed Dec 7, 2013
@scannell
Copy link
Contributor

scannell commented Dec 7, 2013

This needs more information for us to proceed so closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants