bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Firefox doesn't exit properly if loaded security device is detached

RESOLVED INCOMPLETE

Status

()

Core
Security: PSM
RESOLVED INCOMPLETE
8 years ago
2 years ago

People

(Reporter: Victor, Unassigned, NeedInfo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.6.12-1.fc13 Firefox/3.6.12
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.6.12-1.fc13 Firefox/3.6.12

I have noticed that once firefox stopped exiting properly: main window was closed but there was always one process hanging which I had to kill manually.

I performed some analysis and using strace found out that this process was constantly reading /etc/eToken.common.conf. Than I remembered that last time I used this security device (Alladin eToken) I detached it manually without unloading it from Firefox. 

So I went to Preferences->Advanced->Encryption->Security Devices and unloaded eToken module the problem went away.

Reproducible: Always

Steps to Reproduce:
1. Install all the necessary software. In my case it was 
pkiclient-5.00.28-0.x86_64
pcsc-lite-1.5.5-4.fc13.x86_64 (also reproduced with pcsc-lite-1.6.4-1.fc14.x86_64)
2. Set up security certificates in firefox. Load module, in my case it was /usr/lib/libeTPkcs11.so
3. Login using the security device (Preferences->Advanced->Encryption->Security devices->Module section->Login
4. Logout
5. Stop pcscd daemon
6. Detach the security device
7. Exit firefox
Actual Results:  
The main window is closed, however there is one more firefox process hanging in the following loop and preventing all further firefox processes from start: 

506   open("/etc/eToken.common.conf", O_RDONLY) = 51
506   lseek(51, 0, SEEK_END)            = 19
506   lseek(51, 0, SEEK_SET)            = 0
506   read(51, "#empty file so far\n", 19) = 19
506   close(51)                         = 0
506   select(49, NULL, [48], NULL, NULL) = 1 (out [48])
506   sendto(48, "\0\0\0\0\22\0\0\0", 8, MSG_NOSIGNAL, NULL, 0) = 8
506   select(49, [48], NULL, NULL, NULL) = 1 (in [48])
506   read(48, "..., 2496) = 2496
506   futex(0x7fc8473cd140, FUTEX_WAKE_PRIVATE, 1) = 0
506   nanosleep({0, 500000000},  <unfinished ...>
505   <... futex resumed> )             = 1
505   nanosleep({0, 500000000},  <unfinished ...>
503   <... select resumed> )            = 0 (Timeout)
503   select(44, [43], NULL, NULL, {0, 200000}) = 0 (Timeout)
503   select(44, [43], NULL, NULL, {0, 200000}) = 0 (Timeout)
503   select(44, [43], NULL, NULL, {0, 200000} <unfinished ...>
506   <... nanosleep resumed> NULL)     = 0
506   select(49, NULL, [48], NULL, NULL) = 1 (out [48])
506   sendto(48, "\0\0\0\0\22\0\0\0", 8, MSG_NOSIGNAL, NULL, 0) = 8
506   select(49, [48], NULL, NULL, NULL) = 1 (in [48])


Expected Results:  
All firefox processes exit correctly.

Also there was the following problem: if pcscd daemon wasn't stopped correctly (left some files in /var/run) and security device module wasn't unloaded from firefox it(the firefox itself) didn't start properly but constantly hang trying to access pcscd.
(Reporter)

Updated

8 years ago
Version: unspecified → 3.6 Branch
Component: General → Security: PSM
Product: Firefox → Core
QA Contact: general → psm
Version: 3.6 Branch → unspecified
Is this still an issue?
Flags: needinfo?(victor.leschuk)
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.