hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Doubrovkine (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1681) GPF occurs when WindowsNegotiateScheme.dispose() is called by garbage collector
Date Fri, 28 Aug 2015 21:22:47 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14720594#comment-14720594

Daniel Doubrovkine commented on HTTPCLIENT-1681:

Michael, first thanks for hanging on to this. My goal is to remove any bad information on
code.dblock.org and to open and fix any waffle issues if such exist and, finally, to help
the Apache community make any fixes, if possible. 

I've read all the links 3 times and I have specific questions, please explain to me like a
2 yo :)

1) I understand there's an issue disposing of resources in a garbage collector, as in it leads
to crashes. That's a real problem, but I am not sure I agree that anything should be done
about it because we're mixing native and GCed and maybe the right thing to do with native
code is to not force expectations on it of GCed environments, but the other way around? It's
a real problem, but it's not a problem of "the author of this code did not read SSPI documentation",
I am not taking it personally at all as the author, just trying to separate things and fix
them - I think the SSPI documentation is crazy anyway :)

2) "The author of this code did not read SSPI documentation thoroughly. This example has several
issues." - what are those issues? If you feel generous, just PR the fixes into https://github.com/dblock/code.dblock.org/blob/gh-pages/_posts/2010/2010-03-26-jna-acquirecredentialshandle-initializesecuritycontext-and-acceptsecuritycontext-establishing-an-authenticated-connection.markdown,
or at least point them out?

3) Does waffle have any of the issues described in (1)? Do those issues have an issue on https://github.com/dblock/waffle?


> 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
> 4XESTACKTRACE                at com/sun/jna/Structure.autoWrite(Structure.java:1923(Compiled
> 4XESTACKTRACE                at com/sun/jna/Function.convertArgument(Function.java:505(Compiled
> 4XESTACKTRACE                at com/sun/jna/Function.invoke(Function.java:297(Compiled
> 4XESTACKTRACE                at com/sun/jna/Library$Handler.invoke(Library.java:212)
> 4XESTACKTRACE                at com/sun/proxy/$Proxy13.FreeCredentialsHandle(Bytecode
> 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

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message