You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Stein J. Gran (JIRA)" <ji...@apache.org> on 2011/08/15 14:33:27 UTC

[jira] [Created] (AMQNET-339) NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor

NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor
---------------------------------------------------------------------------

                 Key: AMQNET-339
                 URL: https://issues.apache.org/jira/browse/AMQNET-339
             Project: ActiveMQ .Net
          Issue Type: Bug
          Components: NMS
    Affects Versions: 1.5.1
         Environment: Windows Server 2008 R2
.NET 4
            Reporter: Stein J. Gran
            Assignee: Jim Gomes


Using NMS in a Windows service, which crashes with the following entry in the Event Log:

Log Name:      Application
Source:        .NET Runtime
Date:          04.08.2011 02:30:00
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      dev-162.hq.infofinder.no
Description:
Application: IFExchangeFetch.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
   at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
   at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading._TimerCallback.PerformTimerCallback(System.Object)

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1026</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2011-08-04T00:30:00.000000000Z" />
    <EventRecordID>1047</EventRecordID>
    <Channel>Application</Channel>
    <Computer>dev-162.hq.infofinder.no</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Application: IFExchangeFetch.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
   at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
   at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
</Data>
  </EventData>
</Event>

The unfortunate thing here is that the entire service crashes due to this error.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQNET-339) NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor

Posted by "Sergey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQNET-339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey updated AMQNET-339:
--------------------------

    Attachment: memory_leak_inactivity_monitor.png
    
> NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor
> ---------------------------------------------------------------------------
>
>                 Key: AMQNET-339
>                 URL: https://issues.apache.org/jira/browse/AMQNET-339
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.1
>         Environment: Windows Server 2008 R2
> .NET 4
>            Reporter: Stein J. Gran
>            Assignee: Jim Gomes
>            Priority: Critical
>             Fix For: 1.5.2, 1.6.0
>
>         Attachments: InactivityMonitor.cs, memory_leak_inactivity_monitor.png
>
>
> Using NMS in a Windows service, which crashes with the following entry in the Event Log:
> Log Name:      Application
> Source:        .NET Runtime
> Date:          04.08.2011 02:30:00
> Event ID:      1026
> Task Category: None
> Level:         Error
> Keywords:      Classic
> User:          N/A
> Computer:      dev-162.hq.infofinder.no
> Description:
> Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> Event Xml:
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>   <System>
>     <Provider Name=".NET Runtime" />
>     <EventID Qualifiers="0">1026</EventID>
>     <Level>2</Level>
>     <Task>0</Task>
>     <Keywords>0x80000000000000</Keywords>
>     <TimeCreated SystemTime="2011-08-04T00:30:00.000000000Z" />
>     <EventRecordID>1047</EventRecordID>
>     <Channel>Application</Channel>
>     <Computer>dev-162.hq.infofinder.no</Computer>
>     <Security />
>   </System>
>   <EventData>
>     <Data>Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> </Data>
>   </EventData>
> </Event>
> The unfortunate thing here is that the entire service crashes due to this error.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQNET-339) NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQNET-339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13097968#comment-13097968 ] 

Timothy Bish commented on AMQNET-339:
-------------------------------------

You could help by creating a patch file, also you need to grant license to apache in order for any of your changes to be usable by us, you can do that by checking the license grant box when you upload your patch.

> NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor
> ---------------------------------------------------------------------------
>
>                 Key: AMQNET-339
>                 URL: https://issues.apache.org/jira/browse/AMQNET-339
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.1
>         Environment: Windows Server 2008 R2
> .NET 4
>            Reporter: Stein J. Gran
>            Assignee: Jim Gomes
>            Priority: Critical
>         Attachments: InactivityMonitor.cs
>
>
> Using NMS in a Windows service, which crashes with the following entry in the Event Log:
> Log Name:      Application
> Source:        .NET Runtime
> Date:          04.08.2011 02:30:00
> Event ID:      1026
> Task Category: None
> Level:         Error
> Keywords:      Classic
> User:          N/A
> Computer:      dev-162.hq.infofinder.no
> Description:
> Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> Event Xml:
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>   <System>
>     <Provider Name=".NET Runtime" />
>     <EventID Qualifiers="0">1026</EventID>
>     <Level>2</Level>
>     <Task>0</Task>
>     <Keywords>0x80000000000000</Keywords>
>     <TimeCreated SystemTime="2011-08-04T00:30:00.000000000Z" />
>     <EventRecordID>1047</EventRecordID>
>     <Channel>Application</Channel>
>     <Computer>dev-162.hq.infofinder.no</Computer>
>     <Security />
>   </System>
>   <EventData>
>     <Data>Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> </Data>
>   </EventData>
> </Event>
> The unfortunate thing here is that the entire service crashes due to this error.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQNET-339) NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor

Posted by "Frank Gynnild (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQNET-339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086608#comment-13086608 ] 

Frank Gynnild commented on AMQNET-339:
--------------------------------------

I've also experienced this problem.
Can we download .pdb files somewhere for the debug version of 1.5.1 somewhere?
That way I can provide a stack trace at least so we pinpoint what is null.
How can I provide a thread dump when this is happening? It seems to be quite random, but is quite severe when it does since it 
takes the entire process down.

> NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor
> ---------------------------------------------------------------------------
>
>                 Key: AMQNET-339
>                 URL: https://issues.apache.org/jira/browse/AMQNET-339
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.1
>         Environment: Windows Server 2008 R2
> .NET 4
>            Reporter: Stein J. Gran
>            Assignee: Jim Gomes
>            Priority: Critical
>
> Using NMS in a Windows service, which crashes with the following entry in the Event Log:
> Log Name:      Application
> Source:        .NET Runtime
> Date:          04.08.2011 02:30:00
> Event ID:      1026
> Task Category: None
> Level:         Error
> Keywords:      Classic
> User:          N/A
> Computer:      dev-162.hq.infofinder.no
> Description:
> Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> Event Xml:
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>   <System>
>     <Provider Name=".NET Runtime" />
>     <EventID Qualifiers="0">1026</EventID>
>     <Level>2</Level>
>     <Task>0</Task>
>     <Keywords>0x80000000000000</Keywords>
>     <TimeCreated SystemTime="2011-08-04T00:30:00.000000000Z" />
>     <EventRecordID>1047</EventRecordID>
>     <Channel>Application</Channel>
>     <Computer>dev-162.hq.infofinder.no</Computer>
>     <Security />
>   </System>
>   <EventData>
>     <Data>Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> </Data>
>   </EventData>
> </Event>
> The unfortunate thing here is that the entire service crashes due to this error.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQNET-339) NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQNET-339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085056#comment-13085056 ] 

Timothy Bish commented on AMQNET-339:
-------------------------------------

Would be helpful if you can provide any information on how to reproduce or a thread dump from the time that the exception is generated.

> NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor
> ---------------------------------------------------------------------------
>
>                 Key: AMQNET-339
>                 URL: https://issues.apache.org/jira/browse/AMQNET-339
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.1
>         Environment: Windows Server 2008 R2
> .NET 4
>            Reporter: Stein J. Gran
>            Assignee: Jim Gomes
>            Priority: Critical
>
> Using NMS in a Windows service, which crashes with the following entry in the Event Log:
> Log Name:      Application
> Source:        .NET Runtime
> Date:          04.08.2011 02:30:00
> Event ID:      1026
> Task Category: None
> Level:         Error
> Keywords:      Classic
> User:          N/A
> Computer:      dev-162.hq.infofinder.no
> Description:
> Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> Event Xml:
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>   <System>
>     <Provider Name=".NET Runtime" />
>     <EventID Qualifiers="0">1026</EventID>
>     <Level>2</Level>
>     <Task>0</Task>
>     <Keywords>0x80000000000000</Keywords>
>     <TimeCreated SystemTime="2011-08-04T00:30:00.000000000Z" />
>     <EventRecordID>1047</EventRecordID>
>     <Channel>Application</Channel>
>     <Computer>dev-162.hq.infofinder.no</Computer>
>     <Security />
>   </System>
>   <EventData>
>     <Data>Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> </Data>
>   </EventData>
> </Event>
> The unfortunate thing here is that the entire service crashes due to this error.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQNET-339) NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor

Posted by "Stein J. Gran (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQNET-339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stein J. Gran updated AMQNET-339:
---------------------------------

    Priority: Critical  (was: Major)

> NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor
> ---------------------------------------------------------------------------
>
>                 Key: AMQNET-339
>                 URL: https://issues.apache.org/jira/browse/AMQNET-339
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.1
>         Environment: Windows Server 2008 R2
> .NET 4
>            Reporter: Stein J. Gran
>            Assignee: Jim Gomes
>            Priority: Critical
>
> Using NMS in a Windows service, which crashes with the following entry in the Event Log:
> Log Name:      Application
> Source:        .NET Runtime
> Date:          04.08.2011 02:30:00
> Event ID:      1026
> Task Category: None
> Level:         Error
> Keywords:      Classic
> User:          N/A
> Computer:      dev-162.hq.infofinder.no
> Description:
> Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> Event Xml:
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>   <System>
>     <Provider Name=".NET Runtime" />
>     <EventID Qualifiers="0">1026</EventID>
>     <Level>2</Level>
>     <Task>0</Task>
>     <Keywords>0x80000000000000</Keywords>
>     <TimeCreated SystemTime="2011-08-04T00:30:00.000000000Z" />
>     <EventRecordID>1047</EventRecordID>
>     <Channel>Application</Channel>
>     <Computer>dev-162.hq.infofinder.no</Computer>
>     <Security />
>   </System>
>   <EventData>
>     <Data>Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> </Data>
>   </EventData>
> </Event>
> The unfortunate thing here is that the entire service crashes due to this error.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQNET-339) NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor

Posted by "Sergey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQNET-339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey updated AMQNET-339:
--------------------------

    Attachment:     (was: memory_leak_inactivity_monitor.png)
    
> NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor
> ---------------------------------------------------------------------------
>
>                 Key: AMQNET-339
>                 URL: https://issues.apache.org/jira/browse/AMQNET-339
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.1
>         Environment: Windows Server 2008 R2
> .NET 4
>            Reporter: Stein J. Gran
>            Assignee: Jim Gomes
>            Priority: Critical
>             Fix For: 1.5.2, 1.6.0
>
>         Attachments: InactivityMonitor.cs
>
>
> Using NMS in a Windows service, which crashes with the following entry in the Event Log:
> Log Name:      Application
> Source:        .NET Runtime
> Date:          04.08.2011 02:30:00
> Event ID:      1026
> Task Category: None
> Level:         Error
> Keywords:      Classic
> User:          N/A
> Computer:      dev-162.hq.infofinder.no
> Description:
> Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> Event Xml:
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>   <System>
>     <Provider Name=".NET Runtime" />
>     <EventID Qualifiers="0">1026</EventID>
>     <Level>2</Level>
>     <Task>0</Task>
>     <Keywords>0x80000000000000</Keywords>
>     <TimeCreated SystemTime="2011-08-04T00:30:00.000000000Z" />
>     <EventRecordID>1047</EventRecordID>
>     <Channel>Application</Channel>
>     <Computer>dev-162.hq.infofinder.no</Computer>
>     <Security />
>   </System>
>   <EventData>
>     <Data>Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> </Data>
>   </EventData>
> </Event>
> The unfortunate thing here is that the entire service crashes due to this error.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQNET-339) NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor

Posted by "Matthew Good (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQNET-339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172428#comment-13172428 ] 

Matthew Good commented on AMQNET-339:
-------------------------------------

You missed fixing the bigger problem - this benign exception took down the entire application.  Any entry point of a thread should be entirely enclosed in a try/catch to avoid taking down the application.  

The code within CheckConnection should be wrapped in a try/catch and not allowed to propagate any exception out of the method.
                
> NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor
> ---------------------------------------------------------------------------
>
>                 Key: AMQNET-339
>                 URL: https://issues.apache.org/jira/browse/AMQNET-339
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.1
>         Environment: Windows Server 2008 R2
> .NET 4
>            Reporter: Stein J. Gran
>            Assignee: Jim Gomes
>            Priority: Critical
>             Fix For: 1.5.2, 1.6.0
>
>         Attachments: InactivityMonitor.cs
>
>
> Using NMS in a Windows service, which crashes with the following entry in the Event Log:
> Log Name:      Application
> Source:        .NET Runtime
> Date:          04.08.2011 02:30:00
> Event ID:      1026
> Task Category: None
> Level:         Error
> Keywords:      Classic
> User:          N/A
> Computer:      dev-162.hq.infofinder.no
> Description:
> Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> Event Xml:
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>   <System>
>     <Provider Name=".NET Runtime" />
>     <EventID Qualifiers="0">1026</EventID>
>     <Level>2</Level>
>     <Task>0</Task>
>     <Keywords>0x80000000000000</Keywords>
>     <TimeCreated SystemTime="2011-08-04T00:30:00.000000000Z" />
>     <EventRecordID>1047</EventRecordID>
>     <Channel>Application</Channel>
>     <Computer>dev-162.hq.infofinder.no</Computer>
>     <Security />
>   </System>
>   <EventData>
>     <Data>Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> </Data>
>   </EventData>
> </Event>
> The unfortunate thing here is that the entire service crashes due to this error.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQNET-339) NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor

Posted by "Frank Gynnild (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQNET-339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Gynnild updated AMQNET-339:
---------------------------------

    Attachment: InactivityMonitor.cs

I made a patch to InactivityMonitor.cs. With these changes I've been unable to reproduce the issue. Can someone do a diff and include the changes to trunk? That would be great.

> NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor
> ---------------------------------------------------------------------------
>
>                 Key: AMQNET-339
>                 URL: https://issues.apache.org/jira/browse/AMQNET-339
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.1
>         Environment: Windows Server 2008 R2
> .NET 4
>            Reporter: Stein J. Gran
>            Assignee: Jim Gomes
>            Priority: Critical
>         Attachments: InactivityMonitor.cs
>
>
> Using NMS in a Windows service, which crashes with the following entry in the Event Log:
> Log Name:      Application
> Source:        .NET Runtime
> Date:          04.08.2011 02:30:00
> Event ID:      1026
> Task Category: None
> Level:         Error
> Keywords:      Classic
> User:          N/A
> Computer:      dev-162.hq.infofinder.no
> Description:
> Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> Event Xml:
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>   <System>
>     <Provider Name=".NET Runtime" />
>     <EventID Qualifiers="0">1026</EventID>
>     <Level>2</Level>
>     <Task>0</Task>
>     <Keywords>0x80000000000000</Keywords>
>     <TimeCreated SystemTime="2011-08-04T00:30:00.000000000Z" />
>     <EventRecordID>1047</EventRecordID>
>     <Channel>Application</Channel>
>     <Computer>dev-162.hq.infofinder.no</Computer>
>     <Security />
>   </System>
>   <EventData>
>     <Data>Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> </Data>
>   </EventData>
> </Event>
> The unfortunate thing here is that the entire service crashes due to this error.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQNET-339) NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor

Posted by "Frank Gynnild (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQNET-339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086657#comment-13086657 ] 

Frank Gynnild commented on AMQNET-339:
--------------------------------------

Thanks, really appreciate your quick response. 
I can start testing using the PDB files to see if I can get you the exact stack trace.
Agree on the hardening part to avoid the null reference exception, I'll be happy to 
contribute to retesting a patch for this issue.

> NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor
> ---------------------------------------------------------------------------
>
>                 Key: AMQNET-339
>                 URL: https://issues.apache.org/jira/browse/AMQNET-339
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.1
>         Environment: Windows Server 2008 R2
> .NET 4
>            Reporter: Stein J. Gran
>            Assignee: Jim Gomes
>            Priority: Critical
>
> Using NMS in a Windows service, which crashes with the following entry in the Event Log:
> Log Name:      Application
> Source:        .NET Runtime
> Date:          04.08.2011 02:30:00
> Event ID:      1026
> Task Category: None
> Level:         Error
> Keywords:      Classic
> User:          N/A
> Computer:      dev-162.hq.infofinder.no
> Description:
> Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> Event Xml:
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>   <System>
>     <Provider Name=".NET Runtime" />
>     <EventID Qualifiers="0">1026</EventID>
>     <Level>2</Level>
>     <Task>0</Task>
>     <Keywords>0x80000000000000</Keywords>
>     <TimeCreated SystemTime="2011-08-04T00:30:00.000000000Z" />
>     <EventRecordID>1047</EventRecordID>
>     <Channel>Application</Channel>
>     <Computer>dev-162.hq.infofinder.no</Computer>
>     <Security />
>   </System>
>   <EventData>
>     <Data>Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> </Data>
>   </EventData>
> </Event>
> The unfortunate thing here is that the entire service crashes due to this error.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (AMQNET-339) NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor

Posted by "Jim Gomes (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQNET-339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Gomes resolved AMQNET-339.
------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6.0
                   1.5.2

Added null checks before accessing the variable.
                
> NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor
> ---------------------------------------------------------------------------
>
>                 Key: AMQNET-339
>                 URL: https://issues.apache.org/jira/browse/AMQNET-339
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.1
>         Environment: Windows Server 2008 R2
> .NET 4
>            Reporter: Stein J. Gran
>            Assignee: Jim Gomes
>            Priority: Critical
>             Fix For: 1.5.2, 1.6.0
>
>         Attachments: InactivityMonitor.cs
>
>
> Using NMS in a Windows service, which crashes with the following entry in the Event Log:
> Log Name:      Application
> Source:        .NET Runtime
> Date:          04.08.2011 02:30:00
> Event ID:      1026
> Task Category: None
> Level:         Error
> Keywords:      Classic
> User:          N/A
> Computer:      dev-162.hq.infofinder.no
> Description:
> Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> Event Xml:
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>   <System>
>     <Provider Name=".NET Runtime" />
>     <EventID Qualifiers="0">1026</EventID>
>     <Level>2</Level>
>     <Task>0</Task>
>     <Keywords>0x80000000000000</Keywords>
>     <TimeCreated SystemTime="2011-08-04T00:30:00.000000000Z" />
>     <EventRecordID>1047</EventRecordID>
>     <Channel>Application</Channel>
>     <Computer>dev-162.hq.infofinder.no</Computer>
>     <Security />
>   </System>
>   <EventData>
>     <Data>Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> </Data>
>   </EventData>
> </Event>
> The unfortunate thing here is that the entire service crashes due to this error.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQNET-339) NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQNET-339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086647#comment-13086647 ] 

Jim Gomes commented on AMQNET-339:
----------------------------------

I took a look at the code, and my initial suspect for a null pointer exception are the following lines:

{noformat}
    this.asyncWriteTask.IsPending = true;
    this.asyncTasks.Wakeup();
{noformat}

The rest of the {{InactivityMonitor.WriteCheck()}} function is pretty simple.  Accessing the {{asyncWriteTask}} member is the only one that has the possibility of being null.  I think a simple hardening of the code that accesses this function would likely solve the problem.

As far as PDBs go, they should be included in the ZIP package under the debug folder.  You can download it from here:

http://activemq.apache.org/nms/apachenmsactivemq-v151.html

(I just downloaded it, and they are included in the ZIP file.)

> NullReferenceException from Apache.NMS.ActiveMQ.Transport.InactivityMonitor
> ---------------------------------------------------------------------------
>
>                 Key: AMQNET-339
>                 URL: https://issues.apache.org/jira/browse/AMQNET-339
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.1
>         Environment: Windows Server 2008 R2
> .NET 4
>            Reporter: Stein J. Gran
>            Assignee: Jim Gomes
>            Priority: Critical
>
> Using NMS in a Windows service, which crashes with the following entry in the Event Log:
> Log Name:      Application
> Source:        .NET Runtime
> Date:          04.08.2011 02:30:00
> Event ID:      1026
> Task Category: None
> Level:         Error
> Keywords:      Classic
> User:          N/A
> Computer:      dev-162.hq.infofinder.no
> Description:
> Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> Event Xml:
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>   <System>
>     <Provider Name=".NET Runtime" />
>     <EventID Qualifiers="0">1026</EventID>
>     <Level>2</Level>
>     <Task>0</Task>
>     <Keywords>0x80000000000000</Keywords>
>     <TimeCreated SystemTime="2011-08-04T00:30:00.000000000Z" />
>     <EventRecordID>1047</EventRecordID>
>     <Channel>Application</Channel>
>     <Computer>dev-162.hq.infofinder.no</Computer>
>     <Security />
>   </System>
>   <EventData>
>     <Data>Application: IFExchangeFetch.exe
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.NullReferenceException
> Stack:
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.WriteCheck()
>    at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.CheckConnection(System.Object)
>    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
>    at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
> </Data>
>   </EventData>
> </Event>
> The unfortunate thing here is that the entire service crashes due to this error.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira