2009-03-23 13:52:17     Error code 7176 returned in an Ethernet pthread

Document created by Aaronwu Employee on Aug 14, 2013
Version 1Show Document
  • View in full screen mode

2009-03-23 13:52:17     Error code 7176 returned in an Ethernet pthread

Jeff Tan (UNITED STATES)

Message: 71378   

 

Hi all,

 

We have an embedded system that acquires data at a rate of 4 MB/sec and then transfers them to a Window host application via the Ethernet. The data acquisition is implemented in an auto buffer DMA mode with two 256 KB buffers and runs without any problem. The Ethernet data transfer module (EDTM) is implemented into a individual pthread. The problem is that after running for about 2 - 5 hrs, the EDTM exits with an error code of 7176. While the firmware is running, it periodically prints out memory information so that we are sure there is no memory leak or severe fragmentation (normally < 5%).

 

We are suspecting that the Ethernet driver (smc91x.c) or the TCP layer of the uclinux causes this abnormal exit, but we do not know how to track the error. The following is our system configuration:

 

CPU: BF532

 

OS: 2.2.16.27-ADI-2006R2

 

RAM: 32 MB

 

DMA: 1 MB DMA zone

 

We wonder if anyone could help us find the cause of the problem. Any help will be highly appreciated! Thank you for your attention.

 

Jeff Tan

QuoteReplyEditDelete

 

 

2009-03-23 14:20:29     Re: Error code 7176 returned in an Ethernet pthread

Robin Getz (UNITED STATES)

Message: 71383   

 

Jeff:

 

Is there you could update to 2008R1.5 or trunk? 2006 is pretty old.

 

-Robin

QuoteReplyEditDelete

 

 

2009-03-23 14:27:00     Re: Error code 7176 returned in an Ethernet pthread

Mike Frysinger (UNITED STATES)

Message: 71384   

 

"error code 7176" isnt really useful info as that is specific to whatever app you're running.  it isnt a standard error.

 

without any common information, and you running on an old system, it's hard to point a finger at anything.

QuoteReplyEditDelete

 

 

2009-03-23 16:57:27     Re: Error code 7176 returned in an Ethernet pthread

Jeff Tan (UNITED STATES)

Message: 71386   

 

Hi Robin,

 

We could. But since we have customized quite some somponents (SPORT driver, SPI driver, etc), we are hesitate to do an upgrade.

 

BTW, what is trunk?

 

Thanks.

 

 

 

Jeff

QuoteReplyEditDelete

 

 

2009-03-23 17:14:59     Re: Error code 7176 returned in an Ethernet pthread

Jeff Tan (UNITED STATES)

Message: 71388   

 

Hi Mike,

 

7176 is thrown by our Ethernet pthread. I am suspecting it is a status code of a underlying component (maybe Ethernet driver, TCP layer?). As you pointed out, it is not a "standard" error code like those defined in the errno.h.

 

This error bothers us a lot. It usually occurs after the firmware has run for 2 - 3 hrs. We do not have a quick way to reproduce it. Neither do we have a good way to track its source.

 

 

Jeff

QuoteReplyEditDelete

 

 

2009-03-23 17:30:53     Re: Error code 7176 returned in an Ethernet pthread

Robin Getz (UNITED STATES)

Message: 71390   

 

Jeff:

 

>What is in trunk?

 

three years of bug fixes.

 

-Robin

QuoteReplyEditDelete

 

 

2009-03-23 17:41:13     Re: Error code 7176 returned in an Ethernet pthread

Jeff Tan (UNITED STATES)

Message: 71391   

 

Jeff:

 

>What is in trunk?

 

three years of bug fixes.

 

-Robin

 

---

 

Hi Robin,

 

Where do I get it? Thanks.

 

Jeff

QuoteReplyEditDelete

 

 

2009-03-23 18:23:10     Re: Error code 7176 returned in an Ethernet pthread

Michael Hennerich (GERMANY)

Message: 71392    http://docs.blackfin.uclinux.org/doku.php?id=processes

 

http://docs.blackfin.uclinux.org/doku.php?id=version_control_systems

 

http://docs.blackfin.uclinux.org/doku.php?id=developing_with_blackfin_li

ve_sources

 

 

QuoteReplyEditDelete

 

 

2009-03-23 18:43:17     Re: Error code 7176 returned in an Ethernet pthread

Mike Frysinger (UNITED STATES)

Message: 71393   

 

no, kernel layers do not use errors like "7176", nor does the C library.  you have to look in your code to find out where it's coming from.

QuoteReplyEditDelete

 

 

2009-03-25 20:12:59     Re: Error code 7176 returned in an Ethernet pthread

Jeff Tan (UNITED STATES)

Message: 71561   

 

I think I found the cause of the problem: the default pthread stack size is too small. After I increased the stack size from the default value of x3000 to x8000 and recompiled the program, I have not observed a crash yet.

 

BTW, the error code 7176 was indeed returned by the pthread_join() function call but not emitted from our application code.

 

Hope this is useful to others who encountered similar problems.

 

 

Jeff Tan

 

 

QuoteReplyEditDelete

 

 

2009-03-25 22:06:23     Re: Error code 7176 returned in an Ethernet pthread

Mike Frysinger (UNITED STATES)

Message: 71564   

 

more likely it's due to the memory corruption.  pthread_join() will return either an errno or 0, nothing else.

QuoteReplyEditDelete

 

 

2009-03-25 22:09:30     Re: Error code 7176 returned in an Ethernet pthread

Mike Frysinger (UNITED STATES)

Message: 71565   

 

also, the toolchain provides options to enable stack checking in threaded applications

 

https://docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:debugging_applications#multi-threaded_applications

Attachments

    Outcomes