Author

Topic: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.11.0 - page 566. (Read 5806088 times)

legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
does anyone have a old copy or a link where i can get one i cant take the freeze after 5 mins
Well ... so far you've provided zero information about the problem
(you clearly haven't even looked in your cgminer logs to see if it says anything about why it's happening when it happens)

My API commands are a shortcut to seeing some of the possible errors that may have been logged.

We have no info at all about what hardware you are running.

The most common cause of freezing is that your GPUs are being pushed too hard (as I mentioned about stepping them down a bit) or there is something wrong with one of your GPUs.

... and on a slight tangent Smiley
... I had my first GPU hardware issue with mining this weekend ... one of my 2x6950's seems to have a fan problem on one of the 3 fans
They have both been mining for 10 months now - but not non-stop I used to switch them off for 6 hours a day when BTC was below $4
Anyway, I'm impressed - 10 months of card abuse and the only problem on 2 cards so far is a single fan needing something done about it Smiley
hero member
Activity: 502
Merit: 500
does anyone have a old copy or a link where i can get one i cant take the freeze after 5 mins
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
There are only a limited number of ways you can get a "Received kill message"
All of them that could match your screen would be initiated by you or your "extra" software you are running.
Something external to cgminer is telling it to quit.
('Reaped' has nothing to do with it)
legendary
Activity: 2702
Merit: 1468

Not sure which version of driver-bitforce.c you are looking at but 2.4.1 does not check return code from hex2bin().  Sure, terminating after first 4 hex numbers would be better for BFL and Icarus, but jobj_binary()/work_decode() also uses this and checks the return code. 


I'm bug chasing, so I edited the code to use the return value.
P_Shep, I think the code is ok as is.  It actually terminates after 4 hex numbers are converted (len =0)
full member
Activity: 196
Merit: 100
Web Dev, Db Admin, Computer Technician
cgminer stops working, these are it's last entries in the log.

Code:
Discarded cloned or rolled work
Reaped curl 6 from pool 0
Received kill message
Received kill message

Sometimes "Reaped" line is 2 hours passing until "Received kill message"
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
Firstly, make sure you always run with --api-listen (at least)
Then on a rig that has disconnected and reconnected many times, post here the output of 'devdetails' and 'notify'
On windows, the easiest is probably a command prompt in the cgminer directory and type:
 java API devdetails
 java API notify
I have java 7 installed but the commands are not recognized. I put api listen on though.
Well if you just type java and it gives an error that java is not found then it wont work - oh well.

If on the other hand when you type java you get a reply stating the options for java then for some unknown reason you didn't cd to the directory where cgminer is.

In the cgminer directory there is a file API.class which means you can type java API notify when that is your current directory
Also type java API devdetails

If you can't do that - then I give up Smiley
legendary
Activity: 2702
Merit: 1468
Code:
bool hex2bin(unsigned char *p, const char *hexstr, size_t len)
...
return (len == 0 && *hexstr == 0) ? true : false;
}

Should the return value not be || rather than &&?

I think the code is correct.  It also checks input parameters.

If size of buffer (p) is too small for a given hex str,the caller would know that something is wrong.
If the hexStr is truncated to size less than buffer (p) length, the caller would know.

For example: if hexStr points to 32 hex numbers, but the size of buffer pointed by p is 64, the function would return false.
If you had || instead of &&, the function would return true and the caller would assume that there are 64 valid (0-255) bytes.

If you had a prototype:

bool hex2bin(unsigned char *buf, int bufSize, const char *hexstr, int * outlen)

it would allow callers to check the size of the converted binary buffer.



Thing is, the BFL uses hex2bin the other way round: the string is longer than p. The BFL returns a string of nonces, hex2bin is used to extract these nonces. There's no null terminator on each nonce, so hex2bin is returning an error, even though everything is fine.

Not sure which version of driver-bitforce.c you are looking at but 2.4.1 does not check return code from hex2bin().  Sure, terminating after first 4 hex numbers would be better for BFL and Icarus, but jobj_binary()/work_decode() also uses this and checks the return code.  
sr. member
Activity: 392
Merit: 250
Firstly, make sure you always run with --api-listen (at least)
Then on a rig that has disconnected and reconnected many times, post here the output of 'devdetails' and 'notify'
On windows, the easiest is probably a command prompt in the cgminer directory and type:
 java API devdetails
 java API notify
[/quote]
I have java 7 installed but the commands are not recognized. I put api listen on though.
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
can you write exactly what i need to type and i will do it for you it seem mine freeze up after a few hours but it doesn't freeze my comp just cg
Well it relates to cuz0882 since he says he is getting disconnects and 'notify' might say why
Anyway, make sure you also include --api-listen when running cgminer then:
(above reworded Smiley)
Start -> run -> cmd (or Start Menu -> accessories -> command prompt) ... or wherever it is now Tongue
then cd to wherever cgminer is
then the two commands (assuming you have java installed):
 java API devdetails
 java API notify
(before cgminer freezes)

Edit: of course if you are just overclocking you card too far, you simply just need to clock it down a bit more ...
hero member
Activity: 502
Merit: 500
can you write exactly what i need to type and i will do it for you it seem mine freeze up after a few hours but it doesn't freeze my comp just cg
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
Since I updated cgminer the program seems to freeze up a lot. My pool will report that the miner disconnects and reconnects every couple minutes. If I then restart cgminer, it stops responding and even task manager can't close it. It has happened on most of my rigs. Is anyone else having this problem?
Firstly, make sure you always run with --api-listen (at least)
Then on a rig that has disconnected and reconnected many times, post here the output of 'devdetails' and 'notify'
On windows, the easiest is probably a command prompt in the cgminer directory and type:
 java API devdetails
 java API notify
legendary
Activity: 2702
Merit: 1468
Code:
bool hex2bin(unsigned char *p, const char *hexstr, size_t len)
...
return (len == 0 && *hexstr == 0) ? true : false;
}

Should the return value not be || rather than &&?

I think the code is correct.  It also checks input parameters.

If size of buffer (p) is too small for a given hex str,the caller would know that something is wrong.
If the hexStr is truncated to size less than buffer (p) length, the caller would know.

For example: if hexStr points to 32 hex numbers, but the size of buffer pointed by p is 64, the function would return false.
If you had || instead of &&, the function would return true and the caller would assume that there are 64 valid (0-255) bytes.

If you had a prototype:

bool hex2bin(unsigned char *buf, int bufSize, const char *hexstr, int * outlen)

it would allow callers to check the size of the converted binary buffer.

sr. member
Activity: 392
Merit: 250
Since I updated cgminer the program seems to freeze up a lot. My pool will report that the miner disconnects and reconnects every couple minutes. If I then restart cgminer, it stops responding and even task manager can't close it. It has happened on most of my rigs. Is anyone else having this problem?
donator
Activity: 448
Merit: 250
I've been trying to run cgminer with remoting into my Raspberry Pi via ssh.
I tried no use nohup to avoid for cgminer to receive a SIGHUP when I leave ssh, but whenever the input is redirected no /dev/null (what nohup does), cgminer maxes out the CPU usage. Bad thing on the RPi.

How can I get around this?


Add to cgminer:
... --api-listen --api-allow W:127.0.0.1,192.168.0/24 ...
(of course you'll have to correct 192.168.0 to match your network)

Then to exit cgminer:
 echo -n quit | nc 127.0.0.1 4028 ; echo
OR, if you don't have nc (or ncat) then you can use:
 java API quit
if you have API.class in the current directory

i.e. see if a clean exit resolves it

Also, killing screen after 1 second is often before cgminer completes exiting
(since it has to wait on a bunch of threads and then exit with the summary)
... just get the screen to exit when cgminer exits

Edit: OK that reply is a mix of comments to the previous posts ... but the point is yes use screen ... and also a clean exit

screen works well.

the api-listen I'll try soon too, seems quite convenient for remote control.
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
I've been trying to run cgminer with remoting into my Raspberry Pi via ssh.
I tried no use nohup to avoid for cgminer to receive a SIGHUP when I leave ssh, but whenever the input is redirected no /dev/null (what nohup does), cgminer maxes out the CPU usage. Bad thing on the RPi.

How can I get around this?


Add to cgminer:
... --api-listen --api-allow W:127.0.0.1,192.168.0/24 ...
(of course you'll have to correct 192.168.0 to match your network)

Then to exit cgminer:
 echo -n quit | nc 127.0.0.1 4028 ; echo
OR, if you don't have nc (or ncat) then you can use:
 java API quit
if you have API.class in the current directory

i.e. see if a clean exit resolves it

Also, killing screen after 1 second is often before cgminer completes exiting
(since it has to wait on a bunch of threads and then exit with the summary)
... just get the screen to exit when cgminer exits

Edit: OK that reply is a mix of comments to the previous posts ... but the point is yes use screen ... and also a clean exit
legendary
Activity: 1795
Merit: 1208
This is not OK.
There's an updated to that script I've not added yet:

For the kill commands, change them to the following:

Code:
Killall -s SIGINT cgminer
sleep 1
Killall screen
donator
Activity: 448
Merit: 250
Use screen instead?

Look at the scripts in my dd-wrt implementation in my sig. may help you.

Ah, the S99cgminer script I presume.  I'll try the screen command. 

Thanks!
legendary
Activity: 1795
Merit: 1208
This is not OK.
Use screen instead?

Look at the scripts in my dd-wrt implementation in my sig. may help you.
donator
Activity: 448
Merit: 250
I've been trying to run cgminer with remoting into my Raspberry Pi via ssh.
I tried no use nohup to avoid for cgminer to receive a SIGHUP when I leave ssh, but whenever the input is redirected no /dev/null (what nohup does), cgminer maxes out the CPU usage. Bad thing on the RPi.

How can I get around this?

legendary
Activity: 2702
Merit: 1468
I have my computer set to restart every day at a certain time, and CGMiner starts when windows starts. Ya lose 3 minutes of hashing a day, but no 7 day bug you're talking about. The temp/fanspeed/dynamic OC is what makes CGMiner great!

Wrong!  If cgminer crashes right after your reboot, you can lose a bit more than 3 minutes.
Jump to: