[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fastcgipp-users] Segfault on apache shutdown

From: Riccardo Campisano
Subject: Re: [Fastcgipp-users] Segfault on apache shutdown
Date: Fri, 12 Aug 2011 14:17:14 -0300

Thanks for your fast reply.

Running the application from the command line don't cause any problem. The git source was built using the bootstrap script in the package, however the version fastcgi++-2.0beta-6852ded9 built with ./configure && make has the same problem. The app run on a debian stable (a chrooted environment) with boost 1.35.

I add your "debug" code, the source of the application is at the end of this email.

When I start the apache end kill it without call the fcgi application on the browser, no error is reported. When I start the apache, call the fcgi, this log is reported (as correct):

cat /tmp/errlog
[2011-Aug-12 13:58:13] Debug 0
[2011-Aug-12 13:58:13] Debug 1
[2011-Aug-12 13:58:13] Echo::response()

Whenever I stop apache after a call on the fcgi application, the error is reported by syslogd at /var/log/message
Aug 12 13:59:30 ubuntudev kernel: [154439.084532] test.fcgi[6573]: segfault at 0 ip b77db2e8 sp bfd0e0d0 error 4 in[b77d2000+73000]

Thanks, and sorry for my English


#include <fstream>
#include <boost/date_time/posix_time/posix_time.hpp>

#include <fastcgi++/request.hpp>
#include <fastcgi++/manager.hpp>

void error_log(const char* msg)
   using namespace std;
   using namespace boost;
   static ofstream error;
   {"/tmp/errlog", ios_base::out | ios_base::app);
      error.imbue(locale(error.getloc(), new posix_time::time_facet()));

   error << '[' << posix_time::second_clock::local_time() << "] " << msg << endl;

class Echo: public Fastcgipp::Request<wchar_t>
   bool response()
      out << "Content-Type: text/html; charset=utf-8\r\n\r\n";
      out << "Hallo\n";

      return true;

int main()
      error_log("Debug 0");
      Fastcgipp::Manager<Echo> fcgi;
      error_log("Debug 1");
      error_log("Debug 2");
   catch(std::exception& e)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]