SDL-Hercules-390 / hyperion

The SDL Hercules 4.x Hyperion version of the System/370, ESA/390, and z/Architecture Emulator
Other
240 stars 90 forks source link

New "flush logfile after every write" command-line option? #583

Closed Fish-Git closed 1 year ago

Fish-Git commented 1 year ago

A user reports that Hyperion hangs his system so hard that he has to forcibly reboot his system, and after he does, there is no logfile to be found:

As I mentioned earlier, Hyperion starts, I see the console, and I can even connect 3270 terminals (I see the Hercules logo on them). However, when I try to IPL, the system hangs.

Not only Hercules, but the whole computer board becomes unresponsive.

Additionally, after a forced reboot, there is no log file.

Given the value a review of the logfile provides to postmortem analysis, I'm thinking it might help to provide a new command-line option that forcibly flushes the logfile to disk after each and every write so we at least have something to review in such a situation.

I'm thinking maybe whatever messages have been logically written to the logfile might be sitting in a buffer somewhere, either in Hercules or in the file system's, so doing a "commit" (flush) after each write might resolve the "no logfile" situation.

What do the rest of you think?

Fish-Git commented 1 year ago

Closing due to disinterest.

ivan-w commented 1 year ago

Odd.. Because it's already the case when there is an actual log file.. (using the log command anyway).. Many many times have I debugged some code on hercules by using a log file and t+ - started my program and went out for a lunch break because each and every instruction was written to the log file.. Wound up with a multi GB file which I could then scan/search for a specific occurence of some event !

Fish-Git commented 1 year ago

You obviously didn't follow the VERY LONG "CPU utilization on Raspberry Pi" and associated "CPU utilization on MANGO Pi, not Raspberry!!!" threads on the main Hercules list that started sometime around 7/14.

Whenever Andre would try to run current SDL Hyperion, it would hang his Mango Pi system so hard, he had to forcibly shut it down. Keyboard unresponsive, etc. Totally locked up.

He was eventually able to get a log remotely somehow though, so I think the logfile was being created and written to, but for whatever reason, the file wasn't appearing in the filesystem due to his system crashing (hanging).

It was an very interesting thread. We eventually decided the Linux he was using (or the gcc he was building Hercules with) was buggy and didn't fully support his board (which was an off brand Mango Pi board using a D1 RISC chip or something).

Interestingly the Hercules 3.13 that came packaged with it seemed to work just fine. It was only his manually built SDL Hyperion 4.6 that seemed to lock up his system. I think it was a bad pthreads implementation. His 'top' display looked really weird/wrong. (SDL Hyperion sets thread priorities via pthreads, whereas Herc 3.13 doesn't. It used the old "nice" technique or something. (I forget it was so long ago.)