select, jiffies, and SIGALRM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am seeing an issue relating to the jiffies counter wrapping around
at 0x7FFFFFFF.

This is a legacy application, and when it runs on 32-bit Unix-Like
OS's, the application silently dies without leaving core after 248
days.

I was able to manipulate the jiffies counter and run the application.
I was able to reproduce the problem. I captured an strace log, and I
see that SIGALRM (alarm clock) is raised after select times out
(because of no data).

I can add a signal handler to intercept the SIGALRM. But my question
is, why should the signal be raised?

---[ strace.log ]---
select(1024, [3 4 5 6], NULL, NULL, {0, 320000}) = 0 (Timeout)
getitimer(ITIMER_REAL, {it_interval={2147157, 520}, it_value={0, 684895}}) = 0
adjtimex({modes=32769, offset=0, freq=0, maxerror=16384000,
esterror=16384000, status=64, constant=2, precision=1,
tolerance=33554432, time={1097551596, 43475}}) = 5
getitimer(ITIMER_REAL, {it_interval={2147157, 520}, it_value={0, 684895}}) = 0
select(1024, [3 4 5 6], NULL, NULL, {1, 0}) = ? ERESTARTNOHAND (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
Process 4881 detached
---[ eof strace.log ]---


Anyone have any ideas?


-- 
You're not your Job; 
You're not the contents of your wallet.
You're the all singing all dancing crap of the world
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux