Bug in FE Update 2 Date Command

A forum for general AmigaOS 4.x support questions that are not platform-specific
MikeSteed
Posts: 11
Joined: Sat Aug 10, 2013 7:07 am

Bug in FE Update 2 Date Command

Post by MikeSteed »

I've stumbled across a bug in the FE Update 2 Date command- it crashes when asked to set the time from a remote server that doesn't exist or is offline (the latter being how I discovered it).

> Version C:Date FULL
Date 53.7 (08/18/2020)

>Date SERVER blah.de.blah
After a pause while the command tries to access the server, there's a DSI crash. Ignoring the DSI causes the command to hang, with 100% CPU usage.

The stack trace shows the crash is in locale.library, but there's no problem when trying to use the Time preferences program to access the server, so the issue is specific to the Date command.

Mike
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Bug in FE Update 2 Date Command

Post by nbache »

Hmm, I can't reproduce your result, but I get some garbage output instead, after a (localized) error message.

Which system are you on?

And which Locale settings do you have?

Best regards,

Niels
MikeSteed
Posts: 11
Joined: Sat Aug 10, 2013 7:07 am

Re: Bug in FE Update 2 Date Command

Post by MikeSteed »

@Niels

If by system you mean the computer, I have an X1000. In Locale prefs I have the preferred laguage set to english (and so am presumably using built-in default text), the country set to United States, and the timezone set to UTC - 8 hours.

Hmm- I just noticed that when I brought up the Locale prefs the first time the preferred language was set to english. I clicked Cancel. The second time I brought it up the preferred language box was empty. I selected English (english) and clicked Use. I brought it up a third time and confirmed that the language was still english.

Now when I run the offending command (Date SERVER blah.de.blah) there's no crash, and I get part of an error reply, followed by garbage: "t get remote time: ÿÿÿÿÿÿÿÿÿÿ", where the 'ÿ's go on for line after line. That sounds more like what you're seeing.

So part of my problem may be that my preferred language may have gone missing. I saved the locale prefs, which hopefully will fix that. But even if the language is correctly set, Date still gets the error message wrong.

Mike
MikeSteed
Posts: 11
Joined: Sat Aug 10, 2013 7:07 am

Re: Bug in FE Update 2 Date Command

Post by MikeSteed »

@Niels

I just rebooted, ran Locale prefs to confirm that the preferred language is still english, and ran the offending Date command again. I again got the crash, rather than the garbage output. So it seems inconsistent, like a wild pointer where the result depends on what it happens to end up pointing at.

Try running the command right after booting, when there's less likely to be other stuff in memory.

Mike
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Bug in FE Update 2 Date Command

Post by nbache »

I also have an X1000.

My results are quite consistant, they look like this:

Code: Select all

DATO: Kunne ikke hente klokkeslættet: Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­Êþ«­ÊþUk@
I have the same, whether I have just rebooted or I try it on a long-running system (couple of days).

Either way, there is clearly something wrong.

I'll make a Bugzilla report for it.

Thanks for reporting!

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Bug in FE Update 2 Date Command

Post by nbache »

BZ report made.

BTW, is your timesync.library version 53.8? That is another component involved in the funtionality.

Also, can you post a crash log from the situations where you see a crash (the DSI)? If possible logged via serial or the debugbuffer. If you do have serial, it may also be interesting to see your serial output after you ignore the DSI and get into the "lockup".

I can't provide it myself, as I only see the situation with garbage output, not the one with the crash.

Best regards,

Niels
MikeSteed
Posts: 11
Joined: Sat Aug 10, 2013 7:07 am

Re: Bug in FE Update 2 Date Command

Post by MikeSteed »

@Niels

Yes, my timesync.library is version 53.8.

I captured two crashlogs, one via Grim Reaper, and the other via serial (each on a different crash right after booting).

I also captured the serial output (non-debug kernel) while the command was hung after ignoring the DSI. Finally, I grabbed the stack trace from Ranger while the command was hung (both from the same crash as the GR stack trace).

I hope this helps track down the problem. If you need anything more, let me know.

Just a thought- perhaps I get a different result than you because I'm using the built-in english strings, while you're using locale.library to read an external catalog. It looks like the offending string might be "Couldn't get remote time: %s", where the %s is supposed to give further information on the error (from timesync.library?) but ends up pointing to something that's not a string. The literal cause of both the crash and the garbage output is trying to print the invalid string, but the real issue is why it's not valid.

Mike

P.S. I uploaded the various captures as attachments, but I don't seem to see them. I'm not very familiar with posting to this forum; do file attachments not work?
User avatar
colinw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 207
Joined: Mon Aug 15, 2011 9:20 am
Location: Brisbane, QLD. Australia.

Re: Bug in FE Update 2 Date Command

Post by colinw »

Thankyou for the report, I have managed to reproduce the bug here.
The bug is inside timesync.library V53.8 and earlier.

I have just released the fixed update (53.9) to the beta testers.
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Bug in FE Update 2 Date Command

Post by nbache »

Excellent, Colin, thanks!

Mike, don't worry about the crash log then, Colin can already create one himself.

Best regards,

Niels
dstastny
Posts: 48
Joined: Fri Dec 16, 2016 6:31 am
Location: Atlanta GA

Re: Bug in FE Update 2 Date Command

Post by dstastny »

@Niels,

I have to chuckle as I woke up this morning to this crash. You had recommend to me a while back to replace timeguard(still does not work) with a scheduler that runs DATE SERVER PERFS and sure enough it DSI'd this morning.

Nice to know its issue is a regression.

I think Ill need bit more creativity in testing the availability of the timeserver before invoking DATE as I am sure ETA on fix will be a while.


Regards
Doug
Post Reply