bugtpb -- ThinkPad Buttons - Bugs: bug #11342, tpb stops receiving events after a...

 
 

bug #11342: tpb stops receiving events after a little activity with Gentoo 2004.3

Submitter:  Shaw Vrana <svrana>
Submitted:  Fri 17 Dec 2004 07:37:10 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 07 Jan 2005 05:50:30 AM UTC, comment #5: 

The deadlock occurs when xmodmap is run after tpb is invoked.  I saw this because I was stupid enough to put xmodmap commands in my .bashrc, which was then sourced during a konsole invocation.  These are the xmodmap commands that caused the problem:
xmodmap -e "pointer = 1 2 3 6 7 4 5"
xmodmap -e 'keycode 233 = F20'
xmodmap -e 'keycode 234 = F19'

So, I removed them from my .bashrc and made sure they were called before tpb to remove the circumstance that causes the problem.

Not sure which program is doing the locking incorrectly-tpb, xosd, or xmodmap, so I'm not sure whether to keep this bug open or close it.

Shaw Vrana <svrana>
Wed 22 Dec 2004 02:56:19 AM UTC, comment #4: 

Konsole -v reports the following for my system:
Qt: 3.3.3
KDE: 3.3.0
Konsole: 1.4

Anonymous
Wed 22 Dec 2004 02:54:23 AM UTC, comment #3: 

I'm able to reproduce by starting tpb, followed by running konsole.  After starting konsole, tpb will wait for the mutex set in xosd_lock to be released..which never happens, in effect, hanging the tpb process.

Anonymous
Tue 21 Dec 2004 08:44:45 PM UTC, comment #2: 

This problem seems to be specific to using KDEs konsole as the program to launch.  There seems to be a race condition somewhere.  The lock is xosd->mutex in _xosd_lock() of xosd.c of version 2.2.12.  I did some logging, and the lock/unlock calls from tpb are all matched-so this does not appear to be a tpb problem.

To see this problem it is only necessary that another konsole is run after starting tpb, i.e., konsole need not be launched by tpb itself.

I will try to find a more appropriate place for this bug, as I no longer think tpb is the culprit.  I will follow-up with an URL or mailing list of interest.

Anonymous
Fri 17 Dec 2004 08:10:09 PM UTC, comment #1: 

Here's the output of strace.  Right after the 'ThinkPad button pressed', tpb stops responding.  I'll break out the tpb code after work, but for now this will have to do. )

BTW, my thinkpad button is mapped to KDE's `konsole'.  I'm running KDE 3.3.

read(10, "1.16ac 1.2 0x03 0x01 0x00 0x01 1"..., 38) = 38
write(1, "ThinkPad button pressed\n", 24ThinkPad button pressed
) = 24
fork()                                  = 28032
nanosleep({0, 200000000}, NULL)         = 0
lseek(9, 57, SEEK_SET)                  = 57
read(9, "\324", 1)                      = 1
lseek(9, 86, SEEK_SET)                  = 86
read(9, "\324\200\3r", 4)               = 4
lseek(9, 94, SEEK_SET)                  = 94
read(9, "\246", 1)                      = 1
lseek(9, 96, SEEK_SET)                  = 96
read(9, "\207", 1)                      = 1
lseek(10, 0, SEEK_SET)                  = 0
read(10, "1.16ac 1.2 0x03 0x01 0x00 0x01 1"..., 38) = 38
nanosleep({0, 200000000}, NULL)         = 0
lseek(9, 57, SEEK_SET)                  = 57
read(9, "\324", 1)                      = 1
lseek(9, 86, SEEK_SET)                  = 86
read(9, "\324\200\3r", 4)               = 4
lseek(9, 94, SEEK_SET)                  = 94
read(9, "\246", 1)                      = 1
lseek(9, 96, SEEK_SET)                  = 96
read(9, "\207", 1)                      = 1
lseek(10, 0, SEEK_SET)                  = 0
read(10, "1.16ac 1.2 0x03 0x01 0x00 0x01 1"..., 38) = 38
nanosleep({0, 200000000}, NULL)         = 0
lseek(9, 57, SEEK_SET)                  = 57
read(9, "\324", 1)                      = 1
lseek(9, 86, SEEK_SET)                  = 86
read(9, "\324\200\3r", 4)               = 4
lseek(9, 94, SEEK_SET)                  = 94
read(9, "\246", 1)                      = 1
lseek(9, 96, SEEK_SET)                  = 96
read(9, "\207", 1)                      = 1
lseek(10, 0, SEEK_SET)                  = 0
read(10, "1.16ac 1.2 0x03 0x01 0x00 0x01 1"..., 38) = 38
nanosleep({0, 200000000}, NULL)         = 0
lseek(9, 57, SEEK_SET)                  = 57
read(9, "\324", 1)                      = 1
lseek(9, 86, SEEK_SET)                  = 86
read(9, "\324\200\3r", 4)               = 4
lseek(9, 94, SEEK_SET)                  = 94
read(9, "\246", 1)                      = 1
lseek(9, 96, SEEK_SET)                  = 96
read(9, "\207", 1)                      = 1
lseek(10, 0, SEEK_SET)                  = 0
read(10, "1.16ac 1.2 0x03 0x01 0x00 0x01 1"..., 38) = 38
nanosleep({0, 200000000}, NULL)         = 0
lseek(9, 57, SEEK_SET)                  = 57
read(9, "\324", 1)                      = 1
lseek(9, 86, SEEK_SET)                  = 86
read(9, "\324\200\3r", 4)               = 4
lseek(9, 94, SEEK_SET)                  = 94
read(9, "\246", 1)                      = 1
lseek(9, 96, SEEK_SET)                  = 96
read(9, "\207", 1)                      = 1
lseek(10, 0, SEEK_SET)                  = 0
read(10, "1.16ac 1.2 0x03 0x01 0x00 0x01 1"..., 38) = 38
nanosleep({0, 200000000}, NULL)         = 0
lseek(9, 57, SEEK_SET)                  = 57
read(9, "\324", 1)                      = 1
lseek(9, 86, SEEK_SET)                  = 86
read(9, "\324\200\3r", 4)               = 4
lseek(9, 94, SEEK_SET)                  = 94
read(9, "\246", 1)                      = 1
lseek(9, 96, SEEK_SET)                  = 96
read(9, "\10", 1)                       = 1
lseek(10, 0, SEEK_SET)                  = 0
read(10, "1.16ac 1.2 0x03 0x01 0x00 0x01 1"..., 38) = 38
write(1, "Volume changed: Level 57\n", 25Volume changed: Level 57
) = 25
write(5, "\0", 1)                       = 1
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
rt_sigsuspend([] <unfinished ...>
--- SIGCHLD (Child exited) @ 0 (0) ---
<... rt_sigsuspend resumed> )           = -1 EINTR (Interrupted system call)
waitpid(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG) = 28032
sigreturn()                             = ? (mask now [RTMIN])
rt_sigsuspend([] <unfinished ...>

Anonymous
Fri 17 Dec 2004 07:37:10 PM UTC, original submission:  

After using tpb several times, OSD (volume) stops working, as does the thinkpad button, and the sound off button.  Running a `tpb -v', tpb stops reporting that it receives events after 3 volume presses and a thinkpad press, though this seems to vary a bit from time to time, but it always fails quickly.  This is for tpb Version 0.6.3. Restarting tpb always results in the same behavior--works for about the same amount of time, followed by failure.

Shaw Vrana <svrana>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-cf05.
Corresponding source code