Segfault in standalone web application

I have a problem with a standalone web application installed on a linux box
with ubuntu server 12.04 LTS.
Compiled using Xojo 2013 r4.1.
During normal operation it stops working without creating any error.log
I checked the log files of the operating system, I found the following error conditions:
file kern.log:
May 9 16:00:34 MDP-SviluppoSW kernel: [10808240.309623] mdpwebserver[27679]: segfault at cc53d804 ip b7472696 sp bf9bb1fc error 5 in libc-2.15.so[b73fc000+1a3000]

file sys.log
May 16 14:54:06 MDP-SRV-01 kernel: [704834.952225] mdpwebserver[15243]: segfault at 100c ip b745b175 sp b5efb160 error 4 in libc-2.15.so[b73e5000+1a3000]

any idea ?
Thanks

We don’t get stack traces on Linux, so that makes things a little difficult. Here are some things I’d check:

• Is it repeatable, reliably? Is there a usage path that causes it?
• Database plugin? What database, if any, are you using?
• Are you using a unique database connection per session? (You should.)
• RAM shortage?
• Wrap all plugin and library calls with “Print”, see if it’s crashing in one of those.
• Put a Print in every Session, App, WebPage, WebControl, and WebContainer event handler. See if that gives you any hints.

Hi Brad,

• Is it repeatable, reliably? Is there a usage path that causes it?
is repeatable in shuffle mode, I cannot create a unique condition that triggers

• Database plugin? What database, if any, are you using?
Database PostgreSQL 9.0, connection with Xojo plug in

• Are you using a unique database connection per session? (You should.)
One connection to the db from server side and a single connection to the database for every session

• RAM shortage?
the server (a VMWare virtual machine) has 512 MB ??of RAM, 180 MB used

The application is structured in two parts.
the first (server-side) checks once per minute if there are any updates in a db table.
If it finds updated data then loads them into a structure and raises a flag to warn active sessions that need to refresh the screen of the client
The second (client-side) updates the screen client with data loaded from the first

I’m not sure but I think that the problem is present even without any active session

Can you put Prints around all queries and subsequent iterations over result sets?

Print "Running query: " + query rs = myDB.SQLSelect(query) if rs <> nil then while not rs.EOF .... rs.MoveNext wend end if Print "Finished query: " + query

You need to run stand-alone from a terminal prompt or redirect output to a file. If it crashes and has a dangling “Running query” at the end, you’ll know where the problem is. You might have to flush standard output as well here, not sure.

Crashing in the database plugin wouldn’t surprise me at all. If you have MBS, I’ve had better luck lately with their database classes, although they have a different API, so it would be a little work to convert.