php使用imagek时segment fault

| 1 Comment | No TrackBacks

 

在ubuntu 10.04.2 LTS 64bit下使用apt安装的imagemagick和php/imagick, 在处理图片的时候会segment fault退出。
strace显示是处理完毕munmap出现的segment fault...
处理方式是显式设定OMP_NUM_THREADS=1, 是imagemagick使用的libgomp seg faulting。
openmp的committee说openMP在与其他线程模型一块工作时行为未定义...
所以想正常的用,要么编译的时候disable掉openmp, 要么显式export OMP_NUM_THREADS=1, 因为没有一个能在运行时关掉openmp的方法
悲催的是--disable-openmp选项由于经常link失败, 而imagemagick也没有针对这个问题提供2个版本的编译脚本...so

 

参考:
http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=16453
http://gcc.gnu.org/onlinedocs/libgomp/omp_005fget_005fnum_005fthreads.html
http://gcc.gnu.org/onlinedocs/libgomp/OMP_005fNUM_005fTHREADS.html
http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=14953
http://download.oracle.com/docs/cd/E19205-01/821-0387/bjadz/index.html
http://twpug.net/modules/newbb/viewtopic.php?post_id=22102
http://www.h2z.org/read.php?48

No TrackBacks

TrackBack URL: http://blog.suchasplus.com/mt/mt-tb.cgi/311

1 Comment

初来乍到,请多多关照。

Leave a comment

About this Entry

This page contains a single entry by suchasplus published on September 9, 2011 6:56 AM.

为什么php不支持原始类型检查 was the previous entry in this blog.

新网国际域名过期删除策略 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.2.7