Bug 52979 - log.smb may fill log partition with log level 1
log.smb may fill log partition with log level 1
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-1-errata
Assigned To: Juan Pedro Torres
Arvid Requate
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-23 15:12 CET by Dirk Schnick
Modified: 2022-05-18 15:48 CEST (History)
8 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.257
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021031921000391
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schnick univentionstaff 2021-03-23 15:12:36 CET
In customer environments and in my school test environment I can reproduce the behavior.
If folder redirect (f.e. my documents) is activated to f.e. the homeshare of the user (what is usual scenario) every write access logs:

[2021/03/23 14:56:30.617014,  1, pid=2822] ../../source3/smbd/vfs.c:895(vfs_GetWd)
  vfs_GetWd: couldn't stat "." error Keine Berechtigung (NFS problem ?)
[2021/03/23 14:58:27.498480,  0, pid=2822] ../../source3/smbd/uid.c:448(change_to_user_internal)
  change_to_user_internal: chdir_current_service() failed!

In the customer environment within a few hours the log.smbd was bigger than 10 GB with loglevel 1
Comment 3 Arvid Requate univentionstaff 2022-04-21 17:27:31 CEST
Please provide info how to reproduce.
Comment 4 Dirk Schnick univentionstaff 2022-04-25 10:27:30 CEST
Was not able to reproduce the problem directly in my test environment. Have called the customer to check their environment. I'm currently waiting for a call back. Will drop more information here when I got them.
Comment 5 Dirk Schnick univentionstaff 2022-04-25 11:37:42 CEST
I checked the wrong logfile. In my standard test school environment I get the log entries:
[2022/04/25 11:36:18.105918,  1, pid=6715] ../../source3/smbd/vfs.c:895(vfs_GetWd)
  vfs_GetWd: couldn't stat "." error Keine Berechtigung (NFS problem ?)
[2022/04/25 11:36:18.106614,  1, pid=6715] ../../source3/smbd/vfs.c:895(vfs_GetWd)
  vfs_GetWd: couldn't stat "." error Keine Berechtigung (NFS problem ?)

in /var/log/samba/log.smbd by successful creating a new file in redirected (to homeshare) documents folder.
Comment 6 Juan Pedro Torres univentionstaff 2022-05-04 19:15:43 CEST
Package: samba
Version: 2:4.13.13-1A~5.0.0.202205041854
Branch: ucs_5.0-0
Scope: errata5.0-1

samba.yaml
f91496466084 | Bug #52979: update yaml
Comment 7 Juan Pedro Torres univentionstaff 2022-05-04 19:24:04 CEST
Patched samba to raise the debug level of that call to 2. Because we cannot avoid getting the message logged.
Comment 8 Arvid Requate univentionstaff 2022-05-04 20:19:30 CEST
Verified:
* Problem analysis
* Samba patch
* Patch applied during package build
* Package update
* Advisory

r19596 | raise debug level to 2 (61_bug52979-log-fill-at-debug-level-1)
r19597 | adjust patch
r19598 | adjust patch
r19599 | adjust patch
f914964660 | Update yaml
efe6e7f40c | Advisory wording