Re: [Zope-dev] import of zexp containing Page Template objects causes sudden zope death

2010-08-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris Withers wrote:
> Tres Seaver wrote:
>>> It's the sudden death I have issue with, not a peep of logging anywhere...
>> Two options there:
>>
>> - - Run under gdb.
> 
> gdb says:
> 
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_PROTECTION_FAILURE at address: 0xb0186cec
> [Switching to process 12270]
> 0x000dc08c in import_submodule ()
> (gdb) bt
> #0  0x000dc08c in import_submodule ()
> #1  0x000dc409 in load_next ()
> #2  0x000dcdb1 in PyImport_ImportModuleLevel ()
> #3  0x000b5a4f in builtin___import__ ()
> #4  0xeb25 in PyObject_Call ()
> #5  0x000bb4be in PyEval_CallObjectWithKeywords ()
> 
> Now, how in gdb do I find out what it was that was trying to be imported?
> (should any sort of import cause a core dump?!)

http://wiki.python.org/moin/DebuggingWithGdb


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkx4FxEACgkQ+gerLs4ltQ4GbgCg2NrcybBl6re/0aldLOTayf1g
8GIAniqrILMuvJ+fEpDqmRaZlGQK+2LG
=Iv8Y
-END PGP SIGNATURE-

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] import of zexp containing Page Template objects causes sudden zope death

2010-08-27 Thread Chris Withers
Tres Seaver wrote:
>> It's the sudden death I have issue with, not a peep of logging anywhere...
> 
> Two options there:
> 
> - - Run under gdb.

gdb says:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0xb0186cec
[Switching to process 12270]
0x000dc08c in import_submodule ()
(gdb) bt
#0  0x000dc08c in import_submodule ()
#1  0x000dc409 in load_next ()
#2  0x000dcdb1 in PyImport_ImportModuleLevel ()
#3  0x000b5a4f in builtin___import__ ()
#4  0xeb25 in PyObject_Call ()
#5  0x000bb4be in PyEval_CallObjectWithKeywords ()

Now, how in gdb do I find out what it was that was trying to be imported?
(should any sort of import cause a core dump?!)

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] import of zexp containing Page Template objects causes sudden zope death

2010-08-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris Withers wrote:
> Tres Seaver wrote:
>> Binary search is your friend:
>>
>> - - Is it only one of the ZPTs which cause the crash?
> 
> Dunno this yet, will try and find out...
> 
>> - - Can you trim out parts of its content and make it not crash?
> 
> Yep, if I leave the ZPTs out, it's fine ;-)

I meant "part of the offending template".

>> Also, you might try exporting to XML and looking at the XML file for
>> oddities (mojibake, etc.)
> 
> mojibake?

Google is your friend.

>> You might try to open the imported folder under 'zopectl debug' and see
>> if you can examine the contents of the ZPTs. 
> 
> Yep, that worked.
> 
>> If that works, then the
>> issue must be in how 'manage_main' is trying to render the links /
>> titles of the templates.
> 
> I can render manage_main under zopectl debug with a Test.makerequest'd 
> app and a newSecurityManager(None,app.acl_users.getUserById('chris')) :-/
> 
> Again, "wtf?!"
> 
> It's the sudden death I have issue with, not a peep of logging anywhere...

Two options there:

- - Set a breakpoint inside 'manage_main' and step into it until the
  fault.  Figuring out how to do that for a DTMLFile instance is left as
  an exercise for the reader. :)

- - Run under gdb.



Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkx37RQACgkQ+gerLs4ltQ5h+ACfS2FJdVmuMqkRGzjjR2rwPaOG
j5gAoIUPYU5vIKAskMuQspAfit4npqXR
=XetT
-END PGP SIGNATURE-

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] import of zexp containing Page Template objects causes sudden zope death

2010-08-27 Thread Chris Withers
Tres Seaver wrote:
> Binary search is your friend:
> 
> - - Is it only one of the ZPTs which cause the crash?

Dunno this yet, will try and find out...

> - - Can you trim out parts of its content and make it not crash?

Yep, if I leave the ZPTs out, it's fine ;-)

> Also, you might try exporting to XML and looking at the XML file for
> oddities (mojibake, etc.)

mojibake?

> You might try to open the imported folder under 'zopectl debug' and see
> if you can examine the contents of the ZPTs. 

Yep, that worked.

> If that works, then the
> issue must be in how 'manage_main' is trying to render the links /
> titles of the templates.

I can render manage_main under zopectl debug with a Test.makerequest'd 
app and a newSecurityManager(None,app.acl_users.getUserById('chris')) :-/

Again, "wtf?!"

It's the sudden death I have issue with, not a peep of logging anywhere...

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] testing problem with path expressions in page templates

2010-08-27 Thread Chris Withers
Marius Gedminas wrote:
>> What adapter might that be and what's the "right" way to get it 
>> registered in a unit test?
> 
> DefaultTraversable, I think, and
> 
> from zope.app.testing import setup
> setup.setUpTraversal()
> 
> Various other features need various other components, e.g. if your
> template tries to use @@absolute_url, in addition to the above, you'll need
> 
> provideAdapter(zope.traversing.namespace.view,
>adapts=(None, None),
>provides=ITraversable,
>name='view')
> 
> similarly for resources you do something like
> 
> ztapi.provideView(Interface, Interface, ITraversable, 'resource',
>   zope.traversing.namespace.resource)
> ztapi.browserResource('style.css', ResourceStub)
> 
> and let's not even start talking about forms and widgets.
> 
> I'm not sure rendering page templates in unit tests is worth the pain.

Actually, it wasn't that bad:

from Products.Five import zcml

class Tests(unittest.TestCase):

 def setUp(self):
 cleanup.cleanUp()
 zcml._initialized = False
 zcml.load_site()

 def tearDown(self):
 cleanup.cleanUp()

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] import of zexp containing Page Template objects causes sudden zope death

2010-08-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris Withers wrote:
> Hi All,
> 
> So, here the story; I have a zodb that's been around for many years.
> In it, it has a folder containing a few ZPTs and python scripts.
> 
> This server is now running Zope 2.12.
> 
> If I zexp export that folder and import into a clean 2.12 instance, the 
> import works fine, but when I try to go to the folder in the ZMI, Zope 
> dies immediately. No messages, no errors, no output.
> 
> If I delete the ZPTs before the export and import, everything is okay.
> 
> I can browse the folder and ZPTs fine on the originating server, even 
> after the 2.12 upgrade.
> 
> I'm left with a vague "wtf?!" feeling.
> Does anyone have any clue what the problem might be or how I can get any 
> kind of output or error message when it does happen?

Binary search is your friend:

- - Is it only one of the ZPTs which cause the crash?

- - Can you trim out parts of its content and make it not crash?

- - etc.

Also, you might try exporting to XML and looking at the XML file for
oddities (mojibake, etc.)

You might try to open the imported folder under 'zopectl debug' and see
if you can examine the contents of the ZPTs.  If that works, then the
issue must be in how 'manage_main' is trying to render the links /
titles of the templates.



Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkx330cACgkQ+gerLs4ltQ7tIgCfdQRrfof/plQCLV3eSjj2HnTf
VaAAn2JcARDIeqOJBG0TY/1sIEfppMBF
=knjo
-END PGP SIGNATURE-

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] import of zexp containing Page Template objects causes sudden zope death

2010-08-27 Thread Chris Withers
Hi All,

So, here the story; I have a zodb that's been around for many years.
In it, it has a folder containing a few ZPTs and python scripts.

This server is now running Zope 2.12.

If I zexp export that folder and import into a clean 2.12 instance, the 
import works fine, but when I try to go to the folder in the ZMI, Zope 
dies immediately. No messages, no errors, no output.

If I delete the ZPTs before the export and import, everything is okay.

I can browse the folder and ZPTs fine on the originating server, even 
after the 2.12 upgrade.

I'm left with a vague "wtf?!" feeling.
Does anyone have any clue what the problem might be or how I can get any 
kind of output or error message when it does happen?

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope Tests: 34 OK, 11 Failed, 3 Unknown

2010-08-27 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Thu Aug 26 12:00:00 2010 UTC to Fri Aug 27 12:00:00 2010 UTC.
There were 48 messages: 6 from Zope Tests, 1 from buildbot at 
enfoldsystems.com, 4 from buildbot at pov.lt, 13 from buildbot at 
winbot.zope.org, 8 from ccomb at free.fr, 16 from jdriessen at 
thehealthagency.com.


Test failures
-

Subject: FAILED : Zope Buildbot / zope2 slave-osx
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 17:29:34 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018986.html

Subject: FAILED : Zope Buildbot / zope2.12 slave-osx
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 17:33:28 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018989.html

Subject: FAILED : Zope Buildbot / zope2.12 slave-osx
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 19:56:03 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018995.html

Subject: FAILED : Zope Buildbot / zope2 slave-osx
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 19:58:36 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018998.html

Subject: FAILED : winbot / ztk_dev py_244_win32
From: buildbot at winbot.zope.org
Date: Thu Aug 26 22:03:30 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/019011.html

Subject: FAILED : winbot / ztk_dev py_254_win32
From: buildbot at winbot.zope.org
Date: Thu Aug 26 22:05:49 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/019012.html

Subject: FAILED : winbot / ztk_dev py_265_win32
From: buildbot at winbot.zope.org
Date: Thu Aug 26 22:08:27 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/019013.html

Subject: FAILED : winbot / ztk_dev py_265_win64
From: buildbot at winbot.zope.org
Date: Thu Aug 26 22:11:11 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/019015.html

Subject: FAILED : winbot / ztk_10 py_244_win32
From: buildbot at winbot.zope.org
Date: Thu Aug 26 22:19:10 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/019016.html

Subject: FAILED : winbot / ZODB_dev py_270_win32
From: buildbot at winbot.zope.org
Date: Fri Aug 27 03:06:02 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/019029.html

Subject: FAILED : winbot / ZODB_dev py_270_win64
From: buildbot at winbot.zope.org
Date: Fri Aug 27 04:01:52 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/019030.html


Unknown
---

Subject: UNKNOWN : Zope-trunk Python-2.6.5 : Linux
From: Zope Tests
Date: Thu Aug 26 21:32:51 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/019005.html

Subject: UNKNOWN : Zope-trunk-alltests Python-2.6.5 : Linux
From: Zope Tests
Date: Thu Aug 26 21:34:52 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/019006.html

Subject: [zodb-tests] buildbot failure in Enfold Systems on 
zodb-trunk-python-2.6-maestro
From: buildbot at enfoldsystems.com
Date: Fri Aug 27 04:21:36 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/019031.html


Tests passed OK
---

Subject: OK : Zope Buildbot / zope2 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 17:28:41 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018984.html

Subject: OK : Zope Buildbot / zope2 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 17:28:45 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018985.html

Subject: OK : Zope Buildbot / zope2.12 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 17:31:19 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018987.html

Subject: OK : Zope Buildbot / zope2.12 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 17:31:20 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018988.html

Subject: OK : Zope Buildbot / zope2.12 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 19:44:52 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018990.html

Subject: OK : Zope Buildbot / zope2 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 19:46:33 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018991.html

Subject: OK : Zope Buildbot / zope2.12 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 19:49:32 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018992.html

Subject: OK : Zope Buildbot / zope2 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 19:51:18 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018993.html

Subject: OK : Zope Buildbot / ztk slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Thu Aug 26 19:51:54 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-August/018994.html

Subject: OK : Zope Buildbot / ztk_win slave-win
From: jdriessen at thehealthagency.com
Date: Thu A