Discussions
Categories
- 385.5K All Categories
- 5.1K Data
- 2.5K Big Data Appliance
- 2.5K Data Science
- 453.4K Databases
- 223.2K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 47 Multilingual Engine
- 606 MySQL Community Space
- 486 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.2K ORDS, SODA & JSON in the Database
- 585 SQLcl
- 4K SQL Developer Data Modeler
- 188K SQL & PL/SQL
- 21.5K SQL Developer
- 46 Data Integration
- 46 GoldenGate
- 298.4K Development
- 4 Application Development
- 20 Developer Projects
- 166 Programming Languages
- 295K Development Tools
- 150 DevOps
- 3.1K QA/Testing
- 646.7K Java
- 37 Java Learning Subscription
- 37.1K Database Connectivity
- 201 Java Community Process
- 108 Java 25
- 22.2K Java APIs
- 138.3K Java Development Tools
- 165.4K Java EE (Java Enterprise Edition)
- 22 Java Essentials
- 176 Java 8 Questions
- 86K Java Programming
- 82 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 208 Java User Groups
- 25 JavaScript - Nashorn
- Programs
- 667 LiveLabs
- 41 Workshops
- 10.3K Software
- 6.7K Berkeley DB Family
- 3.6K JHeadstart
- 6K Other Languages
- 2.3K Chinese
- 207 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 474 Portuguese
php-fpm works fine w/ 12.5; dumps core w/ 12.6b

Hi, seems like PHP 7.1.4 doesn't like 12.6...
Fetch PHP 7.1.4 from http://www.php.net/downloads.php and run the following commands:
xzcat php-7.1.4.tar.xz| pax -rf -
cd php-7.1.4
gpatch -p1 < 03-event_port.patch
patching file sapi/fpm/fpm/events/port.c
vi ext/fileinfo/libmagic/apprentice.c
Add #include <stddef.h> , see https://bugs.php.net/bug.php?id=70492
PATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:/opt/developerstudio12.5/bin ./configure NM=/usr/gnu/bin/nm CPPFLAGS='-D_LARGEFILE64_SOURCE' CC=cc CFLAGS='-m64 -Ui386 -U__i386 -g -O -KPIC -DPIC -std=c11 -mt' LDFLAGS='-m64 -zaslr=enable -znxstack=enable -znxheap=enable -M /usr/lib/ld/map.noexbss -M /usr/lib/ld/map.noexdata -M /usr/lib/ld/map.pagealign -Bdirect -zignore -zstrip-class=comment -lumem' --prefix=/opt/php7 --enable-mbstring --with-openssl --enable-fpm --with-fpm-user=webservd --with-fpm-group=webservd --enable-opcache --with-pcre-regex=/usr
PATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:/opt/developerstudio12.5/bin gmake -j4
# with 12.5
TEST_PHP_EXECUTABLE=./sapi/cli/php ./sapi/cli/php run-tests.php sapi/fpm/tests/009.phpt
...
PASS FPM: Test Unix Domain Socket [sapi/fpm/tests/009.phpt]
# with 12.6
gmake clean
PATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:/opt/developerstudio12.6b/bin gmake -j4
TEST_PHP_EXECUTABLE=./sapi/cli/php ./sapi/cli/php run-tests.php sapi/fpm/tests/009.phpt
...
FAIL FPM: Test Unix Domain Socket [sapi/fpm/tests/009.phpt]
Hm?!
pstack core
core 'core' of 22939: ./sapi/fpm/php-fpm -F -O -y /tmp/php/php-7.1.4/sapi/fpm/tests/test-fpm
0000000001a12f62 fpm_request_accepting () + 32
pstack: warning: librtld_db failed to initialize; symbols from shared libraries will not be available
Answers
-
What platform are you using: x86 or sparc, Solaris or Linux, and which OS version?
Also please notice that some compiler default options have changed. Be sure the CC and cc commands are what you expect them to be.
-
Solaris 11.3 SRU18, x86 (see Tags)
-
I was unable to complete the build using Studio 12.6 Beta on Solaris 11.3/x86. I followed your download, patch, and config commands. The C compiler rejected /ext/spl/spl_observer.c with various errors. Maybe you omitted a step?
-
That happens when you run configure with the 12.6b compiler making configure believe you can use builtin expect (whatever that is), 12.5 is fine.
See https://community.oracle.com/thread/4032905
You have two options:
1) run configure with the 12.5 compiler (as I did in the steps above)
2) undef PHP_HAVE_BUILTIN_EXPECT in main/php_config.h after running configure
EDIT: horrible layout corrected
-
Thanks. Now I can duplicate the problem.
-
Here's where we are now:
We are not familiar with building PHP. It self-configures, and the output of the build command does not show any of the commands (cc, CC, etc). It's possible that the commands are relying on default behavior that has changed in Studio 12.6. That's the first thing I would look for if I could see the commands.
The compilers emit a lot of warnings. It's possible that the runtime failure is due to questionable source code. That is the second thing I would look for. The easiest way to look into a warning is to generate a preprocessed file so that we can see the exact code the compiler sees. To do that, we need to see the commands that resulted in the warnings.
Can you suggest how to get the makefiles to emit the commands as they are executed?
-
Uhm… Like this?
PATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:/opt/developerstudio12.6b/bin:/usr/sbin gmake V=1 fpm
...
/bin/sh /tmp/php-7.1.4/libtool --silent --preserve-dup-deps --mode=compile cc -I/tmp/php-7.1.4/sapi/fpm -Isapi/fpm/ -I/tmp/php-7.1.4/sapi/fpm/ -DPHP_ATOM_INC -I/tmp/php-7.1.4/include -I/tmp/php-7.1.4/main -I/tmp/php-7.1.4 -I/tmp/php-7.1.4/ext/date/lib -I/usr/include/libxml2 -I/usr/include/pcre -I/usr/include/openldap -I/tmp/php-7.1.4/ext/mbstring/oniguruma -I/tmp/php-7.1.4/ext/mbstring/libmbfl -I/tmp/php-7.1.4/ext/mbstring/libmbfl/mbfl -I/tmp/php-7.1.4/ext/sqlite3/libsqlite -I/tmp/php-7.1.4/TSRM -I/tmp/php-7.1.4/Zend -D_LARGEFILE64_SOURCE -D_POSIX_PTHREAD_SEMANTICS -I/usr/include -m64 -Ui386 -U__i386 -g -O -KPIC -DPIC -std=c11 -mt -DZEND_SIGNALS -c /tmp/php-7.1.4/sapi/fpm/fpm/fpm_trace.c -o sapi/fpm/fpm/fpm_trace.lo
...
-
Seems to be the same issue as
__sync Builtins works when compiled with -m32, broken with -m64
As soon as I change
#define atomic_cmp_set(a,b,c) __sync_bool_compare_and_swap(a,b,c)
to
#define atomic_cmp_set(a,b,c) __sync_bool_compare_and_swap(a,(atomic_t)b,c)
everything is fine. Too bad the fix didn't make it into the 12.6 release