[Seaside] Pharo disappears - revisited

Karsten Kusche karsten at heeg.de
Sun Jul 18 08:38:14 UTC 2021


If you have processes that exit „unexpectedly“ you can try to attach a debugger like lldb to the process. The debugger will automatically halt on exceptions like segmentation faults and such. You can also add breakpoints on „exit“ in order to see if something tells the app to quit. Or add a breakpoint at the end of „main“ to see if the app just thinks it can exit because there’s nothing more to do.

In addition to that you can of course add breakpoints in the image. But no idea where in Pharo you can add breakpoints. In VisualWorks I’d add breakpoints in the SubSystem classes in #tearDown where code is run when the image quits.

You can also try adding a breakpoint to ObjectMemory quit.

Karsten



—

Georg Heeg eK

Wallstraße 22
06366 Köthen<x-apple-data-detectors://0>

Tel.: 03496/214328<tel:03496/214328>
FAX: 03496/214712<tel:03496/214712>
Amtsgericht Dortmund HRA 12812


Am 17. Juli 2021 um 11:38:18, David Pennington (david at lhdavid.co.uk<mailto:david at lhdavid.co.uk>) schrieb:

I have had long discussions on Diascord but to no avail. Perhaps a new statement of the problem might help.

I have a Pharo 9.0, MacOs M1 VM install where I run a Seaside app for my local scale plastic model club. The club as only about 16 members so the traffic is extremely light with most days the only such being search bots.

The pages are mostly designed to display photos of member’s models. The images are held on the server path. The data that makes up the pages is held in my own (what I call) TinyKV (Key Value database). This database uses the Pharo Filesystem to save and retrieve JSON text files.

The Pharo image doesn’t run for more than about 10 hours when it just disappears leaving no crash log or debug files. I have checked the database software and all files are opened and closed correctly so there are no hanging file handles (unless the underlying code doesn’t clean up but that’s a guess).

The Pharo image is running on a brand new 8GB M1 MacMini and is the only code running on that machine.

To test out my code, I recently ran what could be seen as a “Denial of Service” attack on my own web site. The following is the code that I ran on my M1 MacBookAir under Pharo 9/M1 VM.

| response content headers contentList|
Transcript show: Time now printString; cr.
contentList := OrderedCollection new.
1 to: 2000 do: [ : i |
response := ZnClient new
url: 'http://www.ipms-clacton.org.uk:8080/CNWHome';
get;
response.
response := ZnClient new
url: 'http://www.ipms-clacton.org.uk:8080/CNWShowOneImage?ab?022020001.jpg';
get;
response.

contentList add: response contents.
].

Transcript show: Time now printString; cr.
^ contentList

This hit the website with 2000 non-stop requests for the home page and for one of the pages that gets its data from the database (where “022020001.jpg” is a JSON file whose content is
"{"dateOfRecord" : ""owner" : "ab","text" : "1-72 Scale Airfix Lancaster BIII converted to Aries of EANS - Airfix (first mould) with M&E Lancastrian Conversion","imagePath" : "022020001.jpg”}”

I have also tried this code with 250 millisecond wait.

The server accepts all of these requests and even responds to other requests whilst this is happening so I can see nothing wrong with my code, be it the Seaside or the database.

I have run this code on a variety of machines under 8.0 and 9.0. I have run it under VAST on Windows 10 and Windows 2012 Server in addition to on the Mac. I have the same problem under 8.0 as 9.0 no matter which VM I use.

What do I do next?
_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20210718/e257ce48/attachment-0001.html>


More information about the seaside mailing list