[
https://issues.apache.org/jira/browse/HTTPCLIENT-1681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15388786#comment-15388786
]
Trejkaz commented on HTTPCLIENT-1681:
-------------------------------------
Here half a year later and seeing the same issue. Though I do understand that
the code is "experimental", closing a crash issue as "won't fix" seems a bit
harsh to me.
Is there a workaround?
I already figured out that calling dispose() eagerly would probably stop it
happening, and we already have a custom AuthenticationStrategy for other
reasons, so we're the ones calling the create method, but the
AuthenticationStrategy passes the AuthScheme objects back to the caller and I
can't figure out when it's safe to say the caller won't be calling the objects
anymore.
> GPF occurs when WindowsNegotiateScheme.dispose() is called by garbage
> collector
> -------------------------------------------------------------------------------
>
> Key: HTTPCLIENT-1681
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1681
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.5
> Environment: Windows 7
> Reporter: Alexander Bernstein
>
> I am using WindowsNegotiateScheme (created by WindowsNegotiateSchemeFactory)
> to have my client authenticate using SPNEGO.
> During the auth dance, several instances of WindowsNegotiateScheme are
> created. At a later time (arbitrary) these objects are finalized by GC, which
> causes a GPF and a crash.
> 1XMCURTHDINFO Current thread
> NULL ----------------------
> 3XMTHREADINFO "Finalizer thread" J9VMThread:0x0000000003FD1B00,
> j9thread_t:0x00000000050C1F10, java/lang/Thread:0x000007FFDE5E2800, state:R,
> prio=5
> 3XMJAVALTHREAD (java/lang/Thread getId:0x15, isDaemon:true)
> 3XMTHREADINFO1 (native thread ID:0xCBC, native priority:0x5,
> native policy:UNKNOWN, vmstate:R, vm thread flags:0x00000000)
> 3XMTHREADINFO3 Java callstack:
> 4XESTACKTRACE at com/sun/jna/Native.setPointer(Native Method)
> 4XESTACKTRACE at
> com/sun/jna/Pointer.setPointer(Pointer.java:1195)
> 4XESTACKTRACE at com/sun/jna/Memory.setPointer(Memory.java:658)
> 4XESTACKTRACE at com/sun/jna/Pointer.setValue(Pointer.java:937)
> 4XESTACKTRACE at
> com/sun/jna/Structure.writeField(Structure.java:800)
> 4XESTACKTRACE at
> com/sun/jna/Structure.write(Structure.java:718(Compiled Code))
> 4XESTACKTRACE at
> com/sun/jna/Structure.autoWrite(Structure.java:1923(Compiled Code))
> 4XESTACKTRACE at
> com/sun/jna/Function.convertArgument(Function.java:505(Compiled Code))
> 4XESTACKTRACE at
> com/sun/jna/Function.invoke(Function.java:297(Compiled Code))
> 4XESTACKTRACE at
> com/sun/jna/Library$Handler.invoke(Library.java:212)
> 4XESTACKTRACE at
> com/sun/proxy/$Proxy13.FreeCredentialsHandle(Bytecode PC:18)
> 4XESTACKTRACE at
> org/apache/http/impl/auth/win/WindowsNegotiateScheme.dispose(WindowsNegotiateScheme.java:99)
> 4XESTACKTRACE at
> org/apache/http/impl/auth/win/WindowsNegotiateScheme.finalize(WindowsNegotiateScheme.java:117)
> 4XESTACKTRACE at
> java/lang/J9VMInternals.runFinalize(J9VMInternals.java:436)
> 3XMTHREADINFO3 No native callstack available on this platform
> NULL
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]