Wonder if anyone can help me, I've got tftp-server running on both sparc and opteron under solaris 8 and 10.
When I run the server in the foreground with the app bound to a virtual interface it works fine, processing requests. As soon as I daemonise it, the "idle" on port 69 from netstat disappears and the app pins the cpu to 100%, truss shows it repeatedly calling pollsys. Suffice to say it doesn't service requests.
If I don't specify an interface to bind to (so it binds to them all) the app runs fine.
Anyone else seen this behaviour? Would rather not have the service bound to the actual interface if I can help it!
Cheers,
Matt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This behavior surprises me, as both daemon and fg process use the same code. The only difference is while daemonizing, it uses fork to create a new child process and closes the parent process, which is standard practice for daemons. Do you see the same behavior on more than one machine ? and what version you are using and what type (multithread/singleport). Did you compile on Solaris using :-
cc tftpserver.cpp -otftpserver -lsocket -lnsl -lpthread
Thanks for your patience.
Achal
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you please try following for me:-
1) Try using new file on SourceForge (tftpservermtV1.41.tar.gz), file tftpservermtV1.4.tar.gz had logfile issue. It worked as -l logfile but had bug if someone uses -llogfile, it would blow up.
if this does not work then
2) Try using gcc/cc tftpserver.cpp -otftpserver -lsocket -lnsl -lpthread for compiling. I did compile with this command on sparc and tested.
If this too fail, for me, can you try using single port version tftpserverspV1.41.tar.gz (for tesing only)
Let me know how it goes.
Cheers
Achal
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Good news is bug could be reproduced and fixed. It would happen is port no. assigned is 0, which is legal port#. The code was going into loop, thinking it is invalid port.
Please download the tftpservermtV1.41.tar.gz, it would work file.
Lots of thanks for pointing to this deadly bug.
Real Cheers !!!
Achal
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi There,
Wonder if anyone can help me, I've got tftp-server running on both sparc and opteron under solaris 8 and 10.
When I run the server in the foreground with the app bound to a virtual interface it works fine, processing requests. As soon as I daemonise it, the "idle" on port 69 from netstat disappears and the app pins the cpu to 100%, truss shows it repeatedly calling pollsys. Suffice to say it doesn't service requests.
If I don't specify an interface to bind to (so it binds to them all) the app runs fine.
Anyone else seen this behaviour? Would rather not have the service bound to the actual interface if I can help it!
Cheers,
Matt
This behavior surprises me, as both daemon and fg process use the same code. The only difference is while daemonizing, it uses fork to create a new child process and closes the parent process, which is standard practice for daemons. Do you see the same behavior on more than one machine ? and what version you are using and what type (multithread/singleport). Did you compile on Solaris using :-
cc tftpserver.cpp -otftpserver -lsocket -lnsl -lpthread
Thanks for your patience.
Achal
Hiya Achal,
I've replicated this on both sparc and x86.
Version I'm using is 1.4 MT, compiled under solaris using gcc (x86 example)..
gcc -march=opteron -mtune=opteron -threads -m32 -O2 -R /usr/local/lib tftpserver.cpp -otftpserver -lstdc++ -lsocket -lnsl -lpthread
Cheers,
Matt
Hi Matt,
Thanks for your reply.
Can you please try following for me:-
1) Try using new file on SourceForge (tftpservermtV1.41.tar.gz), file tftpservermtV1.4.tar.gz had logfile issue. It worked as -l logfile but had bug if someone uses -llogfile, it would blow up.
if this does not work then
2) Try using gcc/cc tftpserver.cpp -otftpserver -lsocket -lnsl -lpthread for compiling. I did compile with this command on sparc and tested.
If this too fail, for me, can you try using single port version tftpserverspV1.41.tar.gz (for tesing only)
Let me know how it goes.
Cheers
Achal
Hi Matt,
The Good news is bug could be reproduced and fixed. It would happen is port no. assigned is 0, which is legal port#. The code was going into loop, thinking it is invalid port.
Please download the tftpservermtV1.41.tar.gz, it would work file.
Lots of thanks for pointing to this deadly bug.
Real Cheers !!!
Achal
Ahh excellent.. and thanks for the quick fix :)
much obliged it is fixed