troubleshooting 1.7.4 - 1.8 migration

69 views
Skip to first unread message

Jonathan Vanasco

unread,
Feb 27, 2017, 5:27:35 PM2/27/17
to pylons-discuss
I'm looking at upgrading a deployment to 1.8 and running into an issue with pserve

The application runs fine under 1.7.4.  Under 1.8 it starts up, but won't serve.  Instead I'll see this output on the terminal on a request, before it jams up

    pthread_cond_wait: Invalid argument

Can anyone suggest where I should start looking ?

Bert JW Regeer

unread,
Feb 27, 2017, 5:31:42 PM2/27/17
to pylons-...@googlegroups.com
What WSGI server are you using?

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/3d06ada7-188c-4490-a803-4a842d6b73c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Merickel

unread,
Feb 27, 2017, 5:50:37 PM2/27/17
to Pylons
I can't see pyramid haven't anything to do with this. Especially if you aren't using "pserve --reload" which is a new dependency in 1.8 used only during reloading. What other dependencies / versions changed as part of your migration? Are you using gevent?

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.

Jonathan Vanasco

unread,
Feb 27, 2017, 7:25:44 PM2/27/17
to pylons-discuss


On Monday, February 27, 2017 at 5:31:42 PM UTC-5, Bert JW Regeer wrote:
What WSGI server are you using?

That solved it fast -- `waitress ` just needed to be updated.  That testing environment had v0.8.5.  It works fine on the current version, and immediately passed staging testing against uwsgi.

Thanks a ton, Bert and Michael.

Jonathan Vanasco

unread,
Mar 3, 2017, 11:32:01 AM3/3/17
to pylons-discuss
Circling back again, this popped up on another machine yesterday.

From what I can tell the problem wasn't waitress, but "some random dependent package(s)" that were updated via pip installing a required package.  re-installing waittress in the first environment caused an issue.  in the second machine reinstalling it -- and a dozen other packages -- didn't work, but trashing the virtualenv and starting from scratch did.  if this happens to anyone else, that's likely a good quick fix.

Hopefully i'll find time to dig into the environments and be able to pinpoint what is causing these issues with pserve/waitress.

Jonathan Vanasco

unread,
May 6, 2017, 2:30:50 AM5/6/17
to pylons-discuss
This popped up again. I spent a few hours trying to narrow down what package update is causing this and can't.

This happens under waitress in the 1.8.1/2/3 branches on `pserve --reload environment.ini`  but not on `pserve environment.ini`  (i used the full path, this is shorthand)

does anyone have a suggestion on where to look in the code 

Bert JW Regeer

unread,
May 6, 2017, 3:27:02 AM5/6/17
to pylons-...@googlegroups.com
Try destroying the virtualenv and installing it from scratch, then upgrade one package at a time.

Sorry, nowhere in the code do we call pthread_cond_wait explicitly, so I have no idea where to even begin.

Bert

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/2bfeef22-e99c-44be-88cf-fc242e4d811a%40googlegroups.com.

Michael Merickel

unread,
May 6, 2017, 4:53:39 PM5/6/17
to Pylons
Well pserve --reload was changed significantly in 1.8 by rewriting it to use the new hupper library - so if your issues are only with --reload I know where I'd look. Coincidentally that library is undergoing a major rewrite by me right now so... but I have never seen an error like you are mentioning in my development of that library.

On Sat, May 6, 2017 at 2:26 AM, Bert JW Regeer <xist...@0x58.com> wrote:
Try destroying the virtualenv and installing it from scratch, then upgrade one package at a time.

Sorry, nowhere in the code do we call pthread_cond_wait explicitly, so I have no idea where to even begin.

Bert
On May 6, 2017, at 00:30, Jonathan Vanasco <jona...@findmeon.com> wrote:

This popped up again. I spent a few hours trying to narrow down what package update is causing this and can't.

This happens under waitress in the 1.8.1/2/3 branches on `pserve --reload environment.ini`  but not on `pserve environment.ini`  (i used the full path, this is shorthand)

does anyone have a suggestion on where to look in the code 

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscribe@googlegroups.com.

To post to this group, send email to pylons-...@googlegroups.com.

Jonathan Vanasco

unread,
May 6, 2017, 8:11:42 PM5/6/17
to pylons-discuss

hupper is a great place to start. thanks!  I'll try setting some traces there to catch where it is.  this only happens on `--reload`

i spent a few hours with fresh virtualenvs and rolling back to different versions of our code to pinpoint a change with no luck.  i wouldn't be surprised if this is a platform issue with this osx build.  in the meantime I'm using a 1.7 environment for development and 1.8 for testing/deployment.  

Jonathan Vanasco

unread,
May 8, 2017, 3:21:42 PM5/8/17
to pylons-discuss
After several hours of testing, writing a few scripts to make permutations of virtualenvs, updating to the newest python 2.7 and testing on multiple platforms:

1. This only happens on OSX with `--reload`.  i'll need to test a few osx versions to see if that affects anything.
2. I can't track down what eventually causes this.  i had one test environment work, then break when I upgraded to requests `2.13.0`, but I couldn't find anything else that was upgraded -- and requests wasn't the cause. 
Reply all
Reply to author
Forward
0 new messages