07-20-2018
Xt timer call, XtAppAddTimeout, hangs on system clock jump backwards
Hi, I've got an issue which I've been 'google-fu'ing without much luck. We have a legacy program which has been plagued by an issue for a long time and I've been tasked to investigate/fix.
The program uses XMotif2.1 (required due to dependency on an old GUI designer) and runs on a RHEL7 machine (previously RHEL 5 and before that RHEL4). Normal GUI event processing relies on a re-entrant Xt callback using the XtAppAddTimeout call. This works fine, unless the system clock is set backwards, which occurs due during an NTP sync of the system (which can happen at any point during the program). When this occurs, it appears as though the program is frozen. According to my research, the way Xt handles timeouts is by determining the expiration time (system time + expiration interval) and waiting until that absolute time is reached, rather than using a monotonic clock. So, if the timer is waiting for a second to elapse, but during the wait the system time is set backwards by 18 minutes, the timer will wait for 18 minutes and 1 second before going off (i.e. reach the original expected expiration time).
I've found very little information on the web about others experiencing this issue and any suggestions for a solution. We've tried detecting the time jump in a separate thread and then attempting to cancel, via XtRemoveTimeout, and then restart the timer. But, we haven't had much luck. The best solution I've heard so far was to manage the timer outside the X event loop and use XtAppAddWorkProc instead.
This might be a long shot. But, does anyone have any experience with this that could provide some insight. TIA
10 More Discussions You Might Find Interesting
1. AIX
Hello Everyone,
I have a Domino application running on AIX 5.3 that does time conversions worldwide. It uses the operating system time as a reference for the conversion. My problem is that I need the AIX OS clock to be a 12 hour clock (AM/PM) rather than a 24 hour clock. I have tried the date... (2 Replies)
Discussion started by: RTwitchell
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Is there a chance that the clock() call returns 0 eternally???
Using BSD. My RTOS application freezes inconsistently only on particular hosts. When debugging it, I came to see that the RTOS timer does not tick at times. The underlying system call is clock() & it always returns zero when the... (4 Replies)
Discussion started by: smanu
4 Replies
3. UNIX for Advanced & Expert Users
Hi,
Ho do I differentiate system call from library call?
for example if I am using chmod , how do I find out if it is a system call or library call?
Thanks
Muru (2 Replies)
Discussion started by: muru
2 Replies
4. Programming
Hi all,
I am facing a problem in recv() system call i.e.. in my project i have to implement timer for sending (data) and resending purpose when there is no acknowledgement.
is there any way that recv() sys call has its own timer i.e., for ex: recv() has to wait for 10 secs.
if any... (0 Replies)
Discussion started by: Rohil
0 Replies
5. Programming
Hi all,
I am facing a problem in recv() system call i.e.. in my project i have to implement timer for sending (data) and resending purpose when there is no acknowledgement.
is there any way that recv() sys call has its own timer i.e., for ex: recv() has to wait for 10 secs.
if any one knows... (2 Replies)
Discussion started by: Rohil
2 Replies
6. Shell Programming and Scripting
Hi,
I currently use the ntpdate and date command to sync the internal clock source of my Solaris systems to the primary domain controller.
admin@myserver # ntpdate -d -u 192.168.???.???
14 Jan 17:42:02 ntpdate: ntpdate 3-5.93e+sun 03/06/05 23:16:45 (1.4)
transmit(192.168.???.???)... (2 Replies)
Discussion started by: jamba1
2 Replies
7. Solaris
Hi,
today when i started the OS Sun Solaris 10 it hangs on initialization. Following was shown in the end of the screen
Initializing system
Please wait....
*
Please help? (3 Replies)
Discussion started by: malikshahid85
3 Replies
8. Solaris
I am running OpenIndiana development version oi_148 32-bit on a seven-year-old Dell Inspiron 8600.
Seems to be running fine except for one particular annoyance: It freezes whenever a system bell/beep plays.
I have mitigated this by turning the system bell off in gnome-terminal, which I use... (3 Replies)
Discussion started by: DeadBadger
3 Replies
9. SCO
SCO Openserver 6.0.0 had an issue with a NIC losing it's config on reboot. Netconfig would not allow "view protocol" and apparently zeroed out the existing IP info. Repaired from console. After this event, however, the system clock seems to lose 30 seconds for every RTC minute that passes. As a... (1 Reply)
Discussion started by: DoublePanic
1 Replies
10. UNIX for Advanced & Expert Users
The book The Design of the Unix Operating System speaks of a clock or timer that is used in scheduling. The clock generates interrupts that update priority information for processes and preempt processes in a round-robin fashion. It's apparent that this "clock" is not the same thing as the CPU... (1 Reply)
Discussion started by: Ultrix
1 Replies
LEARN ABOUT DEBIAN
net::google::code::issue
Net::Google::Code::Issue(3pm) User Contributed Perl Documentation Net::Google::Code::Issue(3pm)
NAME
Net::Google::Code::Issue - Google Code Issue
SYNOPSIS
use Net::Google::Code::Issue;
my $issue = Net::Google::Code::Issue->new( project => 'net-google-code' );
$issue->load(42);
DESCRIPTION
ATTRIBUTES
project
project name
email, password
user's email and password
id
status
owner
reporter
reported
merged
stars
closed
cc
summary
description
labels
comments
attachments
INTERFACE
load
parse
updated
the last comment's date.
create comment, summary, status, owner, cc, labels, files.
update comment, summary, status, owner, merge_into, cc, labels, blocked_on, files.
list( q => '', can => '', author => '', id => '', label => '', max_results => '', owner => '', published_min => '', published_max => '',
updated_min => '', updated_max => '', start_index => '' )
google's api way to get/search issues
return a list of loaded issues in list context, a ref to the list otherwise.
load_comments
google's api way to get and load comments( no scraping is done here )
parse_hybrid
when $USE_HYBRID is true, we will try to load issue with the google's official api, but as the api is not complete, we still need to do
scraping to load something( e.g. attachments ), this method is used to do this.
AUTHOR
sunnavy "<sunnavy@bestpractical.com>"
LICENCE AND COPYRIGHT
Copyright 2008-2010 Best Practical Solutions.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2010-04-28 Net::Google::Code::Issue(3pm)