Author

Topic: cgminer 3.8.2 sem_post error (Read 2222 times)

full member
Activity: 204
Merit: 100
August 12, 2014, 12:52:59 AM
#11
cgminer often error??  Shocked
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
August 06, 2014, 11:09:25 PM
#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.
newbie
Activity: 1
Merit: 0
August 05, 2014, 03: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 ?
full member
Activity: 174
Merit: 100
< My mining rig >
November 27, 2013, 10:58:31 AM
#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.
full member
Activity: 192
Merit: 100
November 27, 2013, 12: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
full member
Activity: 174
Merit: 100
< My mining rig >
November 26, 2013, 10:46:48 AM
#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.
full member
Activity: 174
Merit: 100
< My mining rig >
November 26, 2013, 01: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.



-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
November 26, 2013, 01:18:02 AM
#4
I speak of semaphore limits, not ram or cpu. Defaults on RPi are quite restrictive.
full member
Activity: 174
Merit: 100
< My mining rig >
November 26, 2013, 12:26:11 AM
#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
Activity: 4088
Merit: 1631
Ruu \o/
November 25, 2013, 11:57:07 PM
#2
Looks to me like you're running out of resources on your RPi device.
full member
Activity: 174
Merit: 100
< My mining rig >
November 25, 2013, 11:39:33 PM
#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.
Jump to: