Bug 6686 - Does not unlink PID files that cannot be opened
Summary: Does not unlink PID files that cannot be opened
Status: NEW
Alias: None
Product: Samba 3.4
Classification: Unclassified
Component: Nmbd (show other bugs)
Version: 3.4.0
Hardware: x86 Other
: P3 normal
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-02 17:01 UTC by Matt Kraai (mail address dead)
Modified: 2009-12-24 11:02 UTC (History)
0 users

See Also:


Attachments
Unlink the pidfile if it exists but cannot be opened (1.09 KB, patch)
2009-09-02 17:08 UTC, Matt Kraai (mail address dead)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Kraai (mail address dead) 2009-09-02 17:01:52 UTC
On our QNX systems, the PID files for nmbd and smbd are sometimes corrupted when the system shuts down.  When the system next boots up and nmbd and smbd try to start, I think that they're unable to open their respective PID files.  This causes pidfile_pid to return 0 but not remove the file.  pidfile_create then fails when it tries to create the file.
Comment 1 Matt Kraai (mail address dead) 2009-09-02 17:08:29 UTC
Created attachment 4626 [details]
Unlink the pidfile if it exists but cannot be opened
Comment 2 Volker Lendecke 2009-09-02 22:56:19 UTC
To me that looks ok (waiting for more comments), but can't we fix the deeper problem: How are the pidfiles corrupted?

Volker
Comment 3 Matt Kraai (mail address dead) 2009-09-03 12:26:28 UTC
(In reply to comment #2)
> To me that looks ok (waiting for more comments), but can't we fix the deeper
> problem: How are the pidfiles corrupted?

I think it usually occurs if the files are open when the system shuts down abnormally (e.g., a power outage).  We also see a lot of corruption of the .tdb databases.