[Zope-dev] Bad Marshal Data

2002-03-27 Thread seb bacon

I've asked this before, about a year ago, but got no response.

Does anyone else ever see 'bad marshal data' errors sometimes?  What are
they a symptom of?

It sometimes happens in my products, other times in Zope.  It always
occurs on import statements.  I usually manage to fix it by playing
around with line spacing, etc, in the module being imported.  Deleting
*pyc files does not help.  Here's an example:

Traceback (most recent call last):
  File /usr/local/Zope-2.5.1b1-src/lib/python/OFS/Application.py, line
531, in import_product
product=__import__(pname, global_dict, global_dict, silly)
ValueError: bad marshal data

seb


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Fwd: [Zope-dev] Re: more on the segfault saga]

2002-03-27 Thread Matthew T. Kromer

Martijn Jacobs wrote:

Hello Leo!

Tell us if your segfaults go away and whether Zope performance is
impacted by it.


The segfault is AWAY! I have an uptime of 2 hours now, it has never been
so long since it's in use! I don't notice any performance differences,
but I also have to say that I can't measure it really. The more
important is that it doesn't crash anymore!

Is this a *final* solution for the crashing? Or is this just a temporary
solution to make sure where the problem is?

BTW : Thank Matt for the patch!


regards,

Martijn.


It's going to be a temporary work around, but we're going to build Zope 
2.4.4 final and Zope 2.5.1 final around it; I'll be building beta 
releases this Friday with the patch included.

-- 
Matt Kromer
Zope Corporation  http://www.zope.com/ 




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] OpenSSH configuration between ZEO clients storage server

2002-03-27 Thread Shane Hathaway

Itamar Shtull-Trauring wrote:
 Toby Dickenson wrote:
 
 but ssh port forwarding is only one layer of TCP. ssh port forwarding
 is good.
 
 
 I'mp pretty sure it's TCP over TCP (ssh protocol does multiplexing). SSL 
 OTOH is not TCP over TCP.

I think you are mistaken. :-)  The site you referred to says that TCP 
over TCP is a bad idea because TCP always assumes an unreliable 
transport, and stacking the compensation results in excessive retries 
and a far less reliable connection.  I agree, this is likely to be a 
problem.

But you don't need reliability compensation to multiplex.  SSH assumes 
the transport layer is reliable.  So an SSH tunnel and an SSL tunnel are 
virtually synonymous.

Now, if ZEO accepted SSL connections directly, it would be quite secure 
and easy to use.  But an out-of-process SSL tunnel would suffer from 
exactly the same difficulties an SSH tunnel does.

The Python standard library has good support for an SSL client but not 
for an SSL server.

Shane


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] OpenSSH configuration between ZEO clients storageserver

2002-03-27 Thread Itamar Shtull-Trauring

Shane Hathaway wrote:

 But you don't need reliability compensation to multiplex.  SSH assumes 
 the transport layer is reliable.  So an SSH tunnel and an SSL tunnel are 
 virtually synonymous.

They're not really, but yeah, I was wrong :)

A SSL forwarder takes a packet, and then sends over another TCP 
connection that happens to be encrypted. It's basically a TCP port 
forwarder. Multiple client connections through the local SSL forwarder 
(e.g. stunnel) will run over *multiple* outgoing streams:

client -- stunnel on localhost --- stunnel on www.foo.com  server 
on www.foo.com

SSH OTOH uses a multiplexing protocol, where multiple streams of data 
run over the same connection, and each have their own flow control. 
Multiple client connections over a SSH port forwarder will run over the 
same *single* stream.

A third thing is TCP over TCP, i.e. PPP over SSH or SSL, which functions 
as a full network connection.

 The Python standard library has good support for an SSL client but not 
 for an SSL server.

pyOpenSSL is good for both servers and clients. Could be better, but 
it's easy
to start using it, especially for select() based servers (its thread-safety
is iffy). Twisted's SSL stuff uses it, and latest version of pyOpenSSL 
may have asyncore example.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZClass Constructor Cleanup for 2.6

2002-03-27 Thread Matt Behrens

Casey Duncan wrote:

 Does anyone see a problem with changing the default generated 
 constructor method for ZClasses to a python script in Zope 2.6?
 
 I think we are encouraging really bad style by keeping this in DTML, 
 since it is purely business logic.
 
 Thoughts? I will, of course, implement this if nobody objects.

+2

(I'm taking Andreas' vote because he says 'zclasses sux' and 'zclasses 
must die', so he's biased)


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZClass Constructor Cleanup for 2.6

2002-03-27 Thread Leonardo Rochael Almeida

On Wed, 2002-03-27 at 17:31, Casey Duncan wrote:
 I don't think this is a big enough change to warrant a real proposal, so 
 I'll shoot this out here:
 
 Does anyone see a problem with changing the default generated 
 constructor method for ZClasses to a python script in Zope 2.6?
 
 I think we are encouraging really bad style by keeping this in DTML, 
 since it is purely business logic.
 
 Thoughts? I will, of course, implement this if nobody objects.

+5

ZClasses have been overlooked enough. Nobody has even bothered putting a
ZCatalogPathAware available for them...

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Bad Marshal Data

2002-03-27 Thread Leonardo Rochael Almeida

I haven't seen anything like that.

What I have seen, an which scares the heck out of me everytime I see it
is UnpicklingErrror, which, in my case, usually happens when the _p_jar
dictionary doesn't have an object that other parts of zope swear they
exist.

The solution to that usually involves trimming the last transaction(s)
off of the ZODB or, when that's not an option, going in thru the monitor
port and forcibly deleting the offending objects, where finding the
offending objects is an adventure in itself.

The problem you're talking about sounds a lot like the ZODB reference to
a ceirtan product got corrupted somehow, and forcing the reload of this
product (by changing it's syntax slightly) makes the problem go away.

On Wed, 2002-03-27 at 08:19, seb bacon wrote:
 I've asked this before, about a year ago, but got no response.
 
 Does anyone else ever see 'bad marshal data' errors sometimes?  What are
 they a symptom of?
 
 It sometimes happens in my products, other times in Zope.  It always
 occurs on import statements.  I usually manage to fix it by playing
 around with line spacing, etc, in the module being imported.  Deleting
 *pyc files does not help.  Here's an example:
 
 Traceback (most recent call last):
   File /usr/local/Zope-2.5.1b1-src/lib/python/OFS/Application.py, line
 531, in import_product
 product=__import__(pname, global_dict, global_dict, silly)
 ValueError: bad marshal data
 
 seb
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 
 
-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZClass Constructor Cleanup for 2.6

2002-03-27 Thread Casey Duncan

Good point, I'll add that to my list.

-Casey

Leonardo Rochael Almeida wrote:
 On Wed, 2002-03-27 at 17:31, Casey Duncan wrote:
 
I don't think this is a big enough change to warrant a real proposal, so 
I'll shoot this out here:

Does anyone see a problem with changing the default generated 
constructor method for ZClasses to a python script in Zope 2.6?

I think we are encouraging really bad style by keeping this in DTML, 
since it is purely business logic.

Thoughts? I will, of course, implement this if nobody objects.

 
 +5
 
 ZClasses have been overlooked enough. Nobody has even bothered putting a
 ZCatalogPathAware available for them...
 
 



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



ZCatalogPathAware (was Re: [Zope-dev] ZClass Constructor Cleanup for 2.6)

2002-03-27 Thread Matt Behrens

Leonardo Rochael Almeida wrote:

 ZClasses have been overlooked enough. Nobody has even bothered putting a
 ZCatalogPathAware available for them...

I tried do to this quickly for someone on IRC once.  The problem is that 
the mixin is identically named for CatalogAwareness and 
CatalogPathAwareness, and as such they show up looking exactly the same 
in the ZClass mixin list. :-)

There's probably a way around this that wasn't immediately obvious at 
the time.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Crashing problem? Python workaround?!

2002-03-27 Thread Matthew T. Kromer

Hey fellow Zopistas:

If you're still experiencing crashing problems with Python 2.1.2, and 
Zope, please consider trying the following test:

 From a clean Python build tree, modify Include/object.h line 587.

#define PyTrash_UNWIND_LEVEL 50

make this read

#define PyTrash_UNWIND_LEVEL 500

Rebuild Python, and Zope, with the new patched Python.  Test it.

If this makes your problem go away, please post here to the list.

Technical details:  this patch prevents Python from storing objects in 
an internal trashcan of objects which need to be deleted, but aren't 
-- a way to avoid C stack recursion.  The trashcan code is not safe from 
the normal garbage collector; it steals a few fields in the object that 
the GC depends on (the reference count and the object type field, in 
fact) and so items in the trashcan will cause the garbage collector to 
crash with a segmentation fault.

Objects only go into the trashcan when a recursive delete is detected, 
with a depth defined by PyTrash_UNWIND_LEVEL.  Bumping this number up to 
a large number has the effect of disabling the trashcan module, at the 
expense of the C stack (because all of those recursive deletes CAN 
happen then.)

Pythonlabs found this today after much assistance from the folks on 
#zope on the irc.openprojects.net system; particularly, Leonardo Rochael 
Almeida's assistance has been extremely valuable in isolating this problem.

This is an intermediate workaround until Pythonlabs develops an official 
fix.  However, by using this workaround, you do not need the specially 
modified ZServerPublisher module I coded.

-- 
Matt Kromer
Zope Corporation  http://www.zope.com/ 




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



re: [Zope-dev] Crashing problem? Python workaround?!

2002-03-27 Thread Martijn Jacobs

Hi Matt, Leo

 Pythonlabs found this today after much assistance from the folks on 
 #zope on the irc.openprojects.net system; particularly, Leonardo Rochael 
 Almeida's assistance has been extremely valuable in isolating this
 problem.

And jus to say it again : thank you all again!! You've made a customer
very happy again!

 This is an intermediate workaround until Pythonlabs develops an official 
 fix.  However, by using this workaround, you do not need the specially 
 modified ZServerPublisher module I coded.

Will this patch be included in the next Zope binary releases? I could
build a zope for on a particular environment, but it would be alot
easier to upgrade all customers with the new binary release.

Anyway : In other words : if this is added in the official Python
release, the bug is cleanly resolved?


-- 
martijn jacobs
east site

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )