Issue 764: curl hangs when called from GetURLDataAsNSData() when HTTP port needs proxy
http://code.google.com/p/gears/issues/detail?id=764

New issue report by foxden:
What steps will reproduce the problem?
1. Set up a network where Port 80 is blocked
2. Set up an HTTP proxy on some other port
3. Configure Mac OS X to use the proxy
4. Install Google Gears
5. Go to www.rememberthemilk.com
6. Sign in and turn on offline syncing
7. Watch Safari hang with a beachball
8. Force Quit Safari, and Mac OS X reports the following hang backtrace (I filtered it through
c++filt for your pleasure).

The backtrace pretty clearly shows that Google Gears is blindly running 'curl' without telling it
about the HTTP proxy set in System Preferences.

===

  User stack:
    19 ??? [0xba4d6]
      19 _NSApplicationMain + 574 (in AppKit) [0x95baff14]
        19 -[NSApplication run] + 795 (in AppKit) [0x95be2cdb]
          19 ??? [0x86be]
19 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 (in AppKit)
[0x95be9ca0]
              19 __DPSNextEvent + 657 (in AppKit) [0x95bea3ed]
19 _BlockUntilNextEventMatchingListInMode + 106 (in HIToolbox) [0x933af10d] 19 _ReceiveNextEventCommon + 374 (in HIToolbox) [0x933af299] 19 _RunCurrentEventLoopInMode + 283 (in HIToolbox) [0x933af480] 19 _CFRunLoopRunInMode + 88 (in CoreFoundation) [0x929becf8] 19 _CFRunLoopRunSpecific + 4469 (in CoreFoundation) [0x929beb45] 19 WebCore::timerFired(__CFRunLoopTimer*, void*) + 68 (in WebCore)
[0x90fdadf4]
19 WebCore::TimerBase::sharedTimerFired() + 162 (in WebCore) [0x90fdaeb2] 19 WebCore::TimerBase::fireTimers(double, WTF::Vector<WebCore::TimerBase*,
0ul> const&) + 137 (in WebCore) [0x90fdb129]
19 KJS::DOMWindowTimer::fired() + 40 (in WebCore) [0x90fdf288] 19 KJS::Window::timerFired(KJS::DOMWindowTimer*) + 269 (in WebCore)
[0x90fdf3ad]
19 WebCore::ScheduledAction::execute(KJS::Window*) + 641 (in WebCore)
[0x90fdf701]
19 KJS::JSObject::call(KJS::ExecState*, KJS::JSObject*, KJS::List const&) + 135
(in JavaScriptCore) [0x93324787]
19 KJS::FunctionImp::callAsFunction(KJS::ExecState*, KJS::JSObject*,
KJS::List const&) + 265 (in JavaScriptCore) [0x932e0509]
19 KJS::FunctionBodyNode::execute(KJS::ExecState*) + 481 (in
JavaScriptCore) [0x932e0a51]
19 KJS::ExprStatementNode::execute(KJS::ExecState*) + 25 (in
JavaScriptCore) [0x932e0309]
19 KJS::FunctionCallDotNode::evaluate(KJS::ExecState*) + 806 (in
JavaScriptCore) [0x932d9db6]
19 KJS::FunctionImp::callAsFunction(KJS::ExecState*, KJS::JSObject*,
KJS::List const&) + 265 (in JavaScriptCore) [0x932e0509]
19 KJS::FunctionBodyNode::execute(KJS::ExecState*) + 481 (in
JavaScriptCore) [0x932e0a51]
19 KJS::IfNode::execute(KJS::ExecState*) + 78 (in JavaScriptCore)
[0x932e02ae]
19 KJS::BlockNode::execute(KJS::ExecState*) + 64 (in
JavaScriptCore) [0x932e7240]
19 KJS::ExprStatementNode::execute(KJS::ExecState*) + 25 (in
JavaScriptCore) [0x932e0309]
19 KJS::FunctionCallDotNode::evaluate(KJS::ExecState*) + 806 (in
JavaScriptCore) [0x932d9db6]
19 KJS::RuntimeMethod::callAsFunction(KJS::ExecState*,
KJS::JSObject*, KJS::List const&) + 278 (in JavaScriptCore) [0x93312536]
19 KJS::Bindings::CInstance::invokeMethod(KJS::ExecState*, WTF::Vector<KJS::Bindings::Method*, 0ul> const&, KJS::List const&) + 267 (in JavaScriptCore)
[0x933126fb]
19 PluginBase::Invoke(NPObject*, void*, _NPVariant const*,
unsigned int, _NPVariant*) + 107 (in libgears.dylib) [0x11b2522b]
19 Dispatcher<GearsDesktop>::CallMethod(void*,
JsCallContext*) + 85 (in libgears.dylib) [0x11b6e765]
19 GearsDesktop::CreateShortcut(JsCallContext*) + 2112
(in libgears.dylib) [0x11b2d960]
19 Desktop::HandleDialogResults(Desktop::ShortcutInfo*,
HtmlDialog*) + 293 (in libgears.dylib) [0x11b2c635]
19 Desktop::SetShortcut(Desktop::ShortcutInfo*, bool, bool, unsigned long, std::basic_string<unsigned short, std::char_traits<unsigned short>,
std::allocator<unsigned short> >*) + 228 (in libgears.dylib) [0x11b2bfd4]
19 Desktop::FetchIcon(Desktop::IconData*, std::basic_string<unsigned short, std::char_traits<unsigned short>, std::allocator<unsigned short> >*, Desktop::IconHandlerInterface*) + 571 (in libgears.dylib) [0x11b2b7cb] 19 GetURLDataAsVector(std::basic_string<unsigned short, std::char_traits<unsigned short>, std::allocator<unsigned short> > const&, std::basic_string<unsigned short, std::char_traits<unsigned short>, std::allocator<unsigned short> > const&, std::vector<unsigned char, std::allocator<unsigned char>
*) + 99 (in
libgears.dylib) [0x11b839b3]
19 GetURLDataAsNSData(std::basic_string<unsigned short, std::char_traits<unsigned short>, std::allocator<unsigned short> > const&, std::basic_string<unsigned short, std::char_traits<unsigned short>, std::allocator<unsigned
short> > const&, NSMutableData*) + 936 (in libgears.dylib) [0x11b838e8]
19 _Curl_perform + 147 (in libcurl.3.dylib)
[0x421268]
19 _Curl_connect + 8230 (in libcurl.3.dylib)
[0x4177ac]
19 _Curl_close + 926 (in libcurl.3.dylib)
[0x415600]
19 _Curl_connecthost + 280 (in libcurl.3.dylib)
[0x422ca6]
19 ___select + 10 (in libSystem.B.dylib)
[0x956025e2]

===

What is the expected output? What do you see instead?

I expect Safari not to hang when Google Gears is syncing. I expect Google Gears to obey my user
settings for HTTP proxies.

One solution would be for Google Gears to set the 'http_proxy' environment variable to the correct value before calling curl. However, this won't work for SOCKS proxies.

What version of the product are you using? On what operating system?

0.4.24.0, Mac OS X 10.5.5, Safari 3.1.2





Issue attributes:
        Status: New
        Owner: ----
        Labels: Type-Defect Priority-Medium

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply via email to