Bug 44647

Summary: Broken threading in adtakeover UMC module causes error
Product: UCS Reporter: Florian Best <best>
Component: AD TakeoverAssignee: Samba maintainers <samba-maintainers>
Status: NEW --- QA Contact: Samba maintainers <samba-maintainers>
Severity: major    
Priority: P5 CC: best, botner
Version: UCS 5.0   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
What kind of report is it?: Bug Report What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 2: Will only affect a few installed domains How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.206 Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:
Bug Depends on: 44365    
Bug Blocks:    

Description Florian Best univentionstaff 2017-05-22 13:13:06 CEST
(In reply to Felix Botner from comment #5)
> OK - i still get an "error" but at least the umc server handles this now by 
>      itself (restarts the module)

(In reply to Florian Best from comment #4)
> I have a reliable way to reproduce this error:
> 
> Execute the following command in a shell:
> # while true; do curl
> http://Administrator:Univention.1@localhost/univention/command/adtakeover/
> progress & sleep 0.1; done
> 
> During this command execute two or three times immediately after another the
> following command:
> 
> # curl
> http://Administrator:Univention.1@localhost/univention/command/adtakeover/
> connect -H 'Content-Type: application/json' -d '{"options": {"ad_username":
> "Administrator", "ad_password": "univention", "ip": "10.200.27.112"}}'
> 
> This will cause the UMC-Server crash.
> The bug is triggered by wrong error handling in combinations with threads in
> the adtakeover module. The module process somehow ends itself which causes
> that all request infos are gone but the state machine/socket buffer still
> contains one response which can't be mapped to any request anymore causing
> this exception.

+++ This bug was initially created as a clone of Bug #44365 +++