Bug 14584 - Infinite loop in assert_no_pending_aio()
Summary: Infinite loop in assert_no_pending_aio()
Status: RESOLVED DUPLICATE of bug 14515
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.12.9
Hardware: x86 Linux
: P5 major (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2020-11-27 07:20 UTC by Peter Urbanec
Modified: 2020-11-27 14:04 UTC (History)
1 user (show)

See Also:

gdb backtrace (10.51 KB, text/plain)
2020-11-27 07:24 UTC, Peter Urbanec
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Urbanec 2020-11-27 07:20:01 UTC
I'm seeing a situation where a Samba server will have a number of processes using up 100% CPU and not make any system calls. I have not managed to reproduce a test case that will trigger this condition.

I built a version of samba with debug symbols and attached gdb. After a bit of investigation, I think I found the reason in source3/smbd/close.c

The function assert_no_pending_aio() is stuck in an infinite loop at line 669.

	while (fsp->num_aio_requests != 0) {

The code above only frees the request, but never decrements the counter, thus the loop never terminates.
Comment 1 Peter Urbanec 2020-11-27 07:24:35 UTC
Created attachment 16349 [details]
gdb backtrace

Attached is a full backtrace from gdb.
Comment 2 Stefan Metzmacher 2020-11-27 14:04:55 UTC

*** This bug has been marked as a duplicate of bug 14515 ***