Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Test fedmsg in a fresh thread under mod_wsgi #115

Closed
ralphbean opened this Issue Feb 1, 2013 · 3 comments

Comments

Projects
None yet
2 participants
Contributor

ralphbean commented Feb 1, 2013

We started seeing fedmsg causing the bodhi masher to segfault.

It used to work and think that the update to zeromq3 may have caused the issue. In order to verify, we need to test in an isolated context. If someone could set up httpd with mod_wsgi and write a simple app to test this that would be great. The app needs to #1) spin off a new thread like the bodhi masher, and #2) have that thread try to emit a fedmsg message.

Owner

lmacken commented Feb 1, 2013

I tried reproducing this issue locally, to no avail.

/etc/httpd/conf.d/fedmsgtest.conf

WSGIRestrictStdout Off
<VirtualHost 0.0.0.0:80>
    WSGIDaemonProcess fedmsg user=apache maximum-requests=1000 display-name=fedmsgtest processes=1 threads=1
    WSGIScriptAlias / /var/www/test/test.wsgi
    <Directory /var/www/test>
    # If weird segfaults occur sometimes, give this a shot
    WSGIProcessGroup fedmsg                                                                                 
    WSGIApplicationGroup %{GLOBAL}
    Require local
    </Directory>
</VirtualHost>

/var/www/test/test.wsgi

import threading
import fedmsg

fedmsg.init(name='relay_inbound', active=True')

class Thread(threading.Thread):
    def run(self):
        print("Running thread!")
        fedmsg.publish('fedmsgtest!', {'msg': 'from thread!'})

def application(environ, start_response):
    fedmsg.publish('fedmsgtest, {'msg': 'in wsgi app'})
    t = Thread()
    t.start()
    t.join()
    start_response('200 OK', [('Content-Type', 'text/plain')])
    yield 'foo\n'
Contributor

ralphbean commented Nov 5, 2013

Well, we both tried testing this. How do you feel about closing it as WONTFIX since bodhi2's masher won't be running under mod_wsgi?

Owner

lmacken commented Nov 6, 2013

Fine with me!

@lmacken lmacken closed this Nov 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment