[Backgroundrb-devel] Error while creating one worker from another

swistak at expro.pl swistak at expro.pl
Tue Jan 23 07:02:47 EST 2007


for some strange reason this error occours when i create one worker from 
another BUT only when i derive worker class from Worker::Base instead or 
Worker::RailsBase - when  change it back it works fine, child worker can 
have empty do_work, but this error still ocours
 


Bad file descriptor (Errno::EBADF)
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:214:in `for_fd'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:214:in 
`close_unused_sockets_after_forking'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:138:in `each'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:138:in `send'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:138:in `method_missing'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:135:in `ex'
/usr/lib/ruby/1.8/sync.rb:229:in `synchronize'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:135:in `ex'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:138:in `method_missing'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:211:in 
`close_unused_sockets_after_forking'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:204:in `catch'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:355:in `initialize'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/middleman.rb:210:in `new'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/middleman.rb:210:in `new_worker'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/thread_pool.rb:36:in `dispatch'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/thread_pool.rb:22:in `initialize'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/thread_pool.rb:22:in `new'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/thread_pool.rb:22:in `dispatch'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/middleman.rb:199:in `new_worker'
/home/swistak/rails+backgroundrb/lib/workers/menager_worker.rb:47:in 
`new_mailman'
/home/swistak/rails+backgroundrb/lib/workers/menager_worker.rb:34:in 
`do_work'
/home/swistak/rails+backgroundrb/lib/workers/menager_worker.rb:30:in `times'
/home/swistak/rails+backgroundrb/lib/workers/menager_worker.rb:30:in 
`do_work'
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
/home/swistak/rails+backgroundrb/lib/workers/menager_worker.rb:29:in 
`do_work'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/worker.rb:55:in `send'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/worker.rb:55:in `work_thread'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/worker.rb:69:in `call'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/worker.rb:69:in `work_thread'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/worker.rb:67:in `initialize'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/worker.rb:67:in `new'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/worker.rb:67:in `work_thread'
/usr/lib/ruby/1.8/drb/drb.rb:1555:in `__send__'
/usr/lib/ruby/1.8/drb/drb.rb:1555:in `perform_without_block'
/usr/lib/ruby/1.8/drb/drb.rb:1515:in `perform'
/usr/lib/ruby/1.8/drb/drb.rb:1589:in `main_loop'
/usr/lib/ruby/1.8/drb/drb.rb:1585:in `loop'
/usr/lib/ruby/1.8/drb/drb.rb:1585:in `main_loop'
/usr/lib/ruby/1.8/drb/drb.rb:1581:in `start'
/usr/lib/ruby/1.8/drb/drb.rb:1581:in `main_loop'
/usr/lib/ruby/1.8/drb/drb.rb:1430:in `run'
/usr/lib/ruby/1.8/drb/drb.rb:1427:in `start'
/usr/lib/ruby/1.8/drb/drb.rb:1427:in `run'
/usr/lib/ruby/1.8/drb/drb.rb:1347:in `initialize'
/usr/lib/ruby/1.8/drb/drb.rb:1627:in `new'
/usr/lib/ruby/1.8/drb/drb.rb:1627:in `start_service'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:396:in `initialize'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:391:in `times'
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:391:in `initialize'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/middleman.rb:210:in `new'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/middleman.rb:210:in `new_worker'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/thread_pool.rb:36:in `dispatch'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/thread_pool.rb:22:in `initialize'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/thread_pool.rb:22:in `new'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/thread_pool.rb:22:in `dispatch'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb/middleman.rb:199:in `new_worker'
/usr/lib/ruby/1.8/drb/drb.rb:1555:in `__send__'
/usr/lib/ruby/1.8/drb/drb.rb:1555:in `perform_without_block'
/usr/lib/ruby/1.8/drb/drb.rb:1515:in `perform'
/usr/lib/ruby/1.8/drb/drb.rb:1589:in `main_loop'
/usr/lib/ruby/1.8/drb/drb.rb:1585:in `loop'
/usr/lib/ruby/1.8/drb/drb.rb:1585:in `main_loop'
/usr/lib/ruby/1.8/drb/drb.rb:1581:in `start'
/usr/lib/ruby/1.8/drb/drb.rb:1581:in `main_loop'
/usr/lib/ruby/1.8/drb/drb.rb:1430:in `run'
/usr/lib/ruby/1.8/drb/drb.rb:1427:in `start'
/usr/lib/ruby/1.8/drb/drb.rb:1427:in `run'
/usr/lib/ruby/1.8/drb/drb.rb:1347:in `initialize'
/usr/lib/ruby/1.8/drb/drb.rb:1627:in `new'
/usr/lib/ruby/1.8/drb/drb.rb:1627:in `start_service'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb_server.rb:315:in `run'
/var/lib/gems/1.8/gems/daemons-1.0.3/lib/daemons/application.rb:186:in 
`call'
/var/lib/gems/1.8/gems/daemons-1.0.3/lib/daemons/application.rb:186:in 
`start_proc'
/var/lib/gems/1.8/gems/daemons-1.0.3/lib/daemons/application.rb:196:in 
`call'
/var/lib/gems/1.8/gems/daemons-1.0.3/lib/daemons/application.rb:196:in 
`start_proc'
/var/lib/gems/1.8/gems/daemons-1.0.3/lib/daemons/application.rb:226:in 
`start'
/var/lib/gems/1.8/gems/daemons-1.0.3/lib/daemons/controller.rb:72:in `run'
/var/lib/gems/1.8/gems/daemons-1.0.3/lib/daemons.rb:179:in `run_proc'
/var/lib/gems/1.8/gems/daemons-1.0.3/lib/daemons/cmdline.rb:94:in `call'
/var/lib/gems/1.8/gems/daemons-1.0.3/lib/daemons/cmdline.rb:94:in 
`catch_exceptions'
/var/lib/gems/1.8/gems/daemons-1.0.3/lib/daemons.rb:178:in `run_proc'
/home/swistak/rails+backgroundrb/vendor/plugins/backgroundrb/server/lib/back 
groundrb_server.rb:301:in `run'
script/backgroundrb:29 


More information about the Backgroundrb-devel mailing list