Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN and Multithreading: blue screen

 I use a teststand sequence to test CAN communication equipments.

My sequence model is a batch model, and I test 4 products in the same time.

Since my high level CAN library can manage only one handle, I use synchronization Locks in my sequence to handle my CAN communications between channels: I open and close channels each time I perform communication tasks.

My vi is called from TestStand in several steps and performs all the tasks (regarding initialization, read & write operations...).

The windows system crashes before 24hours of running, with one or more products: A nice Blue Screen Of the Death freeze my PC with the message:

STOP: 1000008E, {c0000017, 8050579a, a842b6a8, 0}

A memory dump checking on my minidump file produces the following diagnostic:

>* Bugcheck Analysis

>BugCheck 1000008E, {c0000017, 8050579a, a842b6a8, 0}

>Probably caused by : nipalk.sys ( nipalk+41c3b )

>Followup: MachineOwner

>---------

>Finished dump check

 

The acquisition task is about product consumption, and even skipped all related steps the problem occurs. When I skip the CAN operation, there is no problem.

I previously tried these operations:

 */ Upgrade NICAN from V2.2.1 to 2.3.2

 */ Increase communication vi priority level from high priority to time critical priority

 */ Make the vi reentrant (in order to separate the memory spaces)

… no change.

With the Sequential model Sequence the system doesn’t crash.

 

System configuration:

COMMON: PC DELLGX280 / PXI with MXI /1 GPIB/2 CAN8464/1 6224

Teststand 2.0.1/Labview7.1/NI DAQ-mx 7.4

SYSTEM 1: PXI1042/MXI4/ WinXP-SP2/NICAN2.3.2

SYSTEM 2: PXI1000B/MXI3/ Win2K-SP4/NI CAN 2.2.1

Message 1 of 7
(4,573 Views)
Thanks for the information.  It would really help us if you could provide a memory dump from the crash.  While the minidump is OK, it would be better if you could provide a kernel memory dump.  The following KnowledgeBase describes how to configure your computer to create a kernel memory dump:

How Can I Create a Kernel Memory Dump When Windows Crashes?

The memory dump created will be large, so you will probably want to zip it and upload it to the NI ftp site:

ftp://ftp.ni.com/incoming/

Once you have uploaded the memory dump file let me know, I'll be happy to take a look at it to see if we can determine what is causing the crash.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 2 of 7
(4,544 Views)

Hi,

First, thank you for your help.

You will fing the result of the kernel image in the attached file. I can't copy files into the ftp directory because of the company proxy parameters (read only rights).

It's a zipped file with the .dmp file and the dumpchk command result.

Regards.

0 Kudos
Message 3 of 7
(4,530 Views)
I looked at the memory dump file, and I have good and bad news.  The good news is that in the next verion of our driver your machine will no longer Blue Screen, however you will still receive an error message that says something like "out of memory".

Since this error occurs after running for several hours it sounds like there may be a memory leak that leads to the eventual crash (or error when the next version releases).  Would it be possible to post your CAN code that eventually leads to this crash?  Or a small example with the same behavior?  If there is a memory leak in our driver it would be nice to fix that for the next release of the driver as well.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
Message 4 of 7
(4,515 Views)

You are right, I found some error about CAN handle release operations in the library I use.

I search in this way now.

Thank you.

 

0 Kudos
Message 5 of 7
(4,467 Views)

Hi,

My problem is solved.

In our CAN library, we had handles opens with "CAN configure" but not closed properly with "ncClose.vi". This library was running without problem on other bench with the same functionnality, but the driver was closed before an exception occured, and it was not used in multithread mode: I didn't suspect it in a first time.

Thanks for the support.

0 Kudos
Message 6 of 7
(4,444 Views)
Great! I'm glad you found the problem.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 7 of 7
(4,435 Views)