Bug 622398

Summary: Can't call HttpWebRequest.GetRequestStream() from a thread pool thread
Product: [Mono] Mono: Runtime Reporter: Anthony Taranto <anthony.taranto>
Component: miscAssignee: Gonzalo Paniagua Javier <gonzalo>
Status: RESOLVED FIXED QA Contact: Mono Bugs <mono-bugs>
Severity: Normal    
Priority: P5 - None    
Version: SVN   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 621758    
Attachments: repro app

Description Anthony Taranto 2010-07-14 21:58:58 UTC
Created attachment 375995 [details]
repro app

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6

Calling HttpWebRequest.GetRequestStream() from a thread pool thread (started using QueueUserWorkItem()) blocks indefinitely.

Reproducible: Always

Steps to Reproduce:
Run attached test app.
Actual Results:  
App will spawn three thread pool threads, each will try to write to the request stream and block.
Comment 1 Gonzalo Paniagua Javier 2010-07-15 22:11:42 UTC
Fixed in trunk (r160461)
Comment 2 Anthony Taranto 2010-07-16 01:02:01 UTC
this still fails for me on r160463

% mono --version; make run
Mono JIT compiler version 2.7 (/trunk/mono r160463 Thu Jul 15 17:45:12 PDT 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       normal
	Notification:  Thread + polling
	Architecture:  x86
	Disabled:      none
	Misc:          debugger softdebug 
	LLVM:          supported, not enabled.
	GC:            Included Boehm (with typed GC)
mono Test.exe
GetAvailableThreads: 800, 32
Main thread sleeping...
getting request stream
getting request stream
getting request stream
Main thread exiting
Comment 3 Gonzalo Paniagua Javier 2010-07-16 05:15:32 UTC
Fixed in r160468. This time it was an OSX-only bug.
Thanks!
Comment 4 Alan McGovern 2010-07-18 19:36:08 UTC
*** Bug 623281 has been marked as a duplicate of this bug. ***