Topic-icon JomSocial -> Empty Response / exit signal Segmentation fault

Active Subscriptions:

None
Hi,

I have one little problem. It is not a really related to JFBConnect, since it is caused by JomSocial (I have also reported it to them) but it also appears in your SC-Login module. I still haven't found a concrete way to reproduce the error, it just sometimes appears:

When I have enabled the "Remember Me" checkbox in the Login module and then wait until the session ends, in some cases (not every time) I get this server error:

Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

The error log shows this:
[notice] child pid 12009 exit signal Segmentation fault (11)

The problem appears on the device until the session is over, or I clean the cookies. By removing parts of the code while the error appears, I have nailed it down to one line where the error is produced:

$my = CFactory::getUser();

This is where the error comes from and I guess it has to do with the way sessions and the remember me stuff is handled. It also doesn't work if I set the line to $my = CFactory::getUser($user->id);

The problem occurs with the newest version of JFBConnect and the JomSocial 3 RC1 - I know it is not really your responsibility, because the bug is caused by JomSocial, but maybe you have any idea what could happen? I have found out, that the session table has NULL as data in the troubled sessions, so I guess the problem is there (see screenshot).

File Attachment:


I have further nailed the problem down to this area of code:
if( empty($instances[$id]) )
{
if( !is_numeric($id) && !is_null($id))
{
JError::raiseError( 500, JText::sprintf('COM_COMMUNITY_CANNOT_LOAD_USER', $id) );
}

$instances[$id] = new CUser($id);
$isNewUser = $instances[$id]->init();
$instances[$id]->getThumbAvatar();

if( $isNewUser )
{
// New user added to jomSocial database
// trigger event onProfileInit
$appsLib = CAppPlugins::getInstance();
$appsLib->loadApplications();

$args = array();
$args[] = $instances[$id];
$appsLib->triggerEvent( 'onProfileCreate' , $args );
}

// Guess need to have avatar as well.
if($id == 0)
{
JFactory::getLanguage()->load('com_community');

$instances[$id]->name = JText::_('COM_COMMUNITY_ACTIVITIES_GUEST');
$instances[$id]->username = JText::_('COM_COMMUNITY_ACTIVITIES_GUEST');
$instances[$id]->_avatar = 'components/com_community/assets/default.jpg';
$instances[$id]->_thumb = 'components/com_community/assets/default_thumb.jpg';
}
}


As said before: I know it is not really your problem, but maybe you have a idea what is wrong with the session handling...

Best Regards Michael
The topic has been locked.
Support Specialist
Michael,
Yeesh, I really don't have a clue, I'm sorry to say. The Remember Me functionality is a part of Joomla, not the SCLogin module.. we just render that checkbox if the System - Remember Me plugin is enabled. The SCLogin module really doesn't 'do' anything with that and lets Joomla take care of the rest.

With that said, can you help explain things a little more. You say "When I have enabled the "Remember Me" checkbox in the Login module and then wait until the session ends, in some cases (not every time) I get this server error".

Can you tell me:
* You enabled the Remember Me box.. did you then login?
* Assuming you were logged in, you waited until the session expired (15 or 30 minutes or whatever is set in the Global Config).. and then what? Did you refresh the page or naviagate to a new page, or did the page refresh itself somehow?
* Then, you say "The problem appears on the device until the session is over, or I clean the cookies. ". Above, you already said the session expired, so what do you mean by 'until the session is over'.. I thought that's when the issue first happens..?

I don't think the answers above are really going to give me any better answers, but maybe with the clarification it will trigger something.

The things I'd test/ask are:
* Did this issue happen on earlier versions of JomSocial (if you had them installed)? That would be great information to hand off to the JS team.
* Do you have any other User plugins enabled outside of JomSocial, Joomla and JFBConnect? If so, try disabling them.
* Same with System plugins, try disabling any that you don't need or unsure of and see if that helps. It's possible one of them is corrupting the session somehow.

I hope that helps get you started, and best of luck investigating that.

Thanks,
Alex
The topic has been locked.