Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Test fedmsg in a fresh thread under mod_wsgi #115

Closed
ralphbean opened this Issue · 3 comments

2 participants

Ralph Bean Luke Macken
Ralph Bean
Owner

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.

Luke Macken
Owner

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'
Ralph Bean
Owner

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?

Luke Macken
Owner

Fine with me!

Luke Macken lmacken closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.