Bitcoin Forum
May 08, 2024, 07:38:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: cgminer 3.8.2 sem_post error  (Read 2198 times)
5120-01-518-6126 (OP)
Full Member
***
Offline Offline

Activity: 174
Merit: 100


< My mining rig >


View Profile
November 26, 2013, 04:39:33 AM
 #1

Running cgminer 3.8.2 on Raspbian with 8 BFL ASICs connected.  App intermittently quits to command line with status dump (anywhere from ~2 hours up to ~11 hours between failures) with the following error reported:

"Failed to sem_post errno=38 cgsem=0x0xa8cfd7d8 in usbutils.c.transfer callback():2358"

If the app is using the standard error.h, this refers to trying to do a socket operation on something that's not a socket.  Any ideas?

Other than this issue, seems to be a great app.
"You Asked For Change, We Gave You Coins" -- casascius
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715197095
Hero Member
*
Offline Offline

Posts: 1715197095

View Profile Personal Message (Offline)

Ignore
1715197095
Reply with quote  #2

1715197095
Report to moderator
1715197095
Hero Member
*
Offline Offline

Posts: 1715197095

View Profile Personal Message (Offline)

Ignore
1715197095
Reply with quote  #2

1715197095
Report to moderator
1715197095
Hero Member
*
Offline Offline

Posts: 1715197095

View Profile Personal Message (Offline)

Ignore
1715197095
Reply with quote  #2

1715197095
Report to moderator
-ck
Legendary
*
Offline Offline

Activity: 4102
Merit: 1632


Ruu \o/


View Profile WWW
November 26, 2013, 04:57:07 AM
 #2

Looks to me like you're running out of resources on your RPi device.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
5120-01-518-6126 (OP)
Full Member
***
Offline Offline

Activity: 174
Merit: 100


< My mining rig >


View Profile
November 26, 2013, 05:26:11 AM
Last edit: November 26, 2013, 06:20:04 AM by 5120-01-518-6126
 #3

Looks to me like you're running out of resources on your RPi device.

So, I've been watching top for awhile thru ssh and the snapshot below is about as busy as it gets (only showing 4 "busiest" tasks).  Didn't see any change in free mem past 30 minutes.

top - 21:06:23 up 1 day, 17 min,  2 users,  load average: 0.38, 0.36, 0.40
Tasks:  70 total,   1 running,  69 sleeping,   0 stopped,   0 zombie
%Cpu(s): 11.7 us, 14.9 sy,  0.7 ni, 71.5 id,  0.0 wa,  0.0 hi,  1.1 si,  0.0 st
KiB Mem:    448736 total,   248020 used,   200716 free,    44180 buffers
KiB Swap:   102396 total,        0 used,   102396 free,   157248 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
10617 root      20   0  243m 4820 2704 S  22.1  1.1  14:40.26 cgminer
 2213 root      20   0 24452 7464 2340 S   2.3  1.7  20:40.24 wicd
 2249 root      20   0 14980 8048 3996 S   1.3  1.8   9:13.03 wicd-monitor
16550 pi        20   0  4808 1620 1032 R   1.3  0.4   0:03.76 top


Edit:  Couple hours watching top and cpu loading is the same, though I do see a slight decrease in free memory (about 700KB) -- a little exploration showed it matches increases in the various log files, but this tells me running out of memory is probably not the cause of the random sem_post problem.
-ck
Legendary
*
Offline Offline

Activity: 4102
Merit: 1632


Ruu \o/


View Profile WWW
November 26, 2013, 06:18:02 AM
 #4

I speak of semaphore limits, not ram or cpu. Defaults on RPi are quite restrictive.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
5120-01-518-6126 (OP)
Full Member
***
Offline Offline

Activity: 174
Merit: 100


< My mining rig >


View Profile
November 26, 2013, 06:32:08 AM
 #5

I speak of semaphore limits, not ram or cpu. Defaults on RPi are quite restrictive.

Thanks for the tip -- cat /proc/sys/kernel/sem showed: 250     32000   32      128

I've doubled it to 500 64000 32 256, so we'll see if that helps.  Will let you know.



5120-01-518-6126 (OP)
Full Member
***
Offline Offline

Activity: 174
Merit: 100


< My mining rig >


View Profile
November 26, 2013, 03:46:48 PM
 #6

I speak of semaphore limits, not ram or cpu. Defaults on RPi are quite restrictive.

Thanks for the tip -- cat /proc/sys/kernel/sem showed: 250     32000   32      128

I've doubled it to 500 64000 32 256, so we'll see if that helps.  Will let you know.


Well, thinking that was the solution I took a long break -- got back to see cgminer only ran 9 minutes before throwing the same sem_post/callback error Sad
On restart, it ran a bit over 5 hours then same error.  Spose it could be hardware -- will load up bfgminer to see if I have the same prob.
fractalbc
Full Member
***
Offline Offline

Activity: 192
Merit: 100


View Profile
November 27, 2013, 05:05:38 AM
 #7

I saw a similar error after upgrading from 3.8.1 to 3.8.2.

I restarted everything (pulled the plug) and it has been working for almost 3 days on a pi with 18 erupters and a fury.

3.8.2 is no faster than 3.8.1 as far as I can see so if it happens again I will downgrade to 3.8.1
5120-01-518-6126 (OP)
Full Member
***
Offline Offline

Activity: 174
Merit: 100


< My mining rig >


View Profile
November 27, 2013, 03:58:31 PM
 #8

Final report:  loaded bfgminer 3.6.0 -- running stable 21 hours now.  Maybe bfgminer conserves resources better than cgminer on a RasPi so will keep it for now, but looking forward to trying cgminer 3.9 in the future.
tos42
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
August 05, 2014, 08:49:01 AM
 #9

Hi,

I have the same problem here with cgminer 4.5.0.

Here is my config :

R-pi B with Raspbian v7.6
Linux kernel : Linux raspberrypi 3.12.22+ #691 PREEMPT Wed Jun 18 18:29:58 BST 2014 armv6l GNU/Linux
cgminer compiled with : ./configure --prefix=/opt/cgminer-4.5.0 --enable-icarus

Everything worked fine for about a month with a rockminer R-Box (and cgminer 4.4.2).

Now I added 2 more of these r-boxes on the same USB port (via a powered USB hub) and it fails either with a Segmentation Fault or "Failed to sem_post errno=38 cgsem=0x0xb473e6b0 in usbutils.c transfer_callback():2774"

I already have changed the semaphore values :

kernel.sem = 2048       2097152 2048    1024

but I don't think that's the point.

I see a lot of USB errors in /var/log/messages : "Aug  5 10:40:23 raspberrypi kernel: [42515.751676] usb 1-1.2.3: reset full-speed USB device number 51 using dwc_otg"

So I'll try to connect one of the r-boxes to the other USB port on the pi to see if it changes anything.

Any other ideas I could try ?
-ck
Legendary
*
Offline Offline

Activity: 4102
Merit: 1632


Ruu \o/


View Profile WWW
August 07, 2014, 04:09:25 AM
 #10

The sem_post error was a bug in the code which was fixed quite a while ago and cgminer no longer uses sysv semaphores so raising the limits won't help. If you're having instability on pi it's often a corrupt sdcard or bad distribution, and the usb on a pi is pretty dodgy even when it works well. Try them on a regular pc to exclude that as the issue, then look into the pi installation as I said if it's fine on a pc.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
realproject
Full Member
***
Offline Offline

Activity: 204
Merit: 100



View Profile
August 12, 2014, 05:52:59 AM
 #11

cgminer often error??  Shocked
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!