Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* UPDATE: DATETIME fields incorrect on alpha
@ 1999-12-13  2:11 ppetrakis
  1999-12-13  3:32 ` Nikolaos Ntarmos
  0 siblings, 1 reply; 3+ messages in thread
From: ppetrakis @ 1999-12-13  2:11 UTC (permalink / raw)
  To: MySQL (E-mail); +Cc: Rich Payne, axp-list

First let me apoligize for the cross-posting.

Picking up where this gentleman left off...
http://www.geocrawler.com/search/?config=8&words=Alpha+DATETIME

I'm experencing the same problem with both the stable and 'alpha' versions
of MySQL. I tried the suggestion of upgrading to glibc-2.1.2-17 (obtained
from redhat's rawhide dist) with no change. I then tried compiling the
stable and 'alpha' versions against the newer glibc. Now mysqld SEGV's at
startup. 

This SEGV is accomplished by using the 'alpha' SRPM with it's default
flags. gdb output of the core dump with a back trace is below:

[root@voodoo:/usr/src/redhat/RPMS/alpha]$ gdb mysqld core
GNU gdb 4.17.0.11 with Linux support
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "alpha-redhat-linux"...
Core was generated by `mysqld core'.
Program terminated with signal 11, Segmentation fault.
#0  0x120119ae8 in pthread_setcanceltype (type=1, oldtype=0x11ffffa70)
    at cancel.c:42
42        if (oldtype != NULL) *oldtype = THREAD_GETMEM(self,
p_canceltype);
(gdb) bt
#0  0x120119ae8 in pthread_setcanceltype (type=1, oldtype=0x11ffffa70)
    at cancel.c:42
#1  0x120118c48 in fcntl (fd=0, cmd=1) at wrapsyscall.c:77
#2  0x120123624 in check_standard_fds () at
../sysdeps/generic/libc-start.c:99
#3  0x120123810 in __libc_start_main (main=0x12004bfa0 <main>, argc=2,
    argv=0x11ffffb58, init=0x120000120 <_init>, fini=0x120183c40 <_fini>,
    rtld_fini=0, stack_end=0x11ffffb40) at
../sysdeps/generic/libc-start.c:60
Current language:  auto; currently c

If I try to compile the 'alpha' version according to the alpha-linux
compile time flags specified at
http://www.mysql.com/Manual_chapter/manual_Installing.html#Linux-Alpha .
It will fail at compiling. To reiterate  the flags i used where: 

(syntax is from modified spec file in the 'alpha' SRPM)

	CC=\"${MYSQL_BUILD_CC:-gcc}\" \
	CFLAGS=\"${MYSQL_BUILD_CFLAGS:- -Dalpha_linux_port }\" \
	CXX=\"${MYSQL_BUILD_CXX:-gcc}\" \
	CXXFLAGS=\"${MYSQL_BUILD_CXXFLAGS:- -O3 -Dalpha_linux_port
-felide-constructors -fno-exceptions -fno-rtti  }\" \

The error message is:

egcs -DUNDEF_THREADS_HACK -I./../include -I../include -I./.. -I.. -I..
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O6
-DDBUG_OFF -O3 -Dalpha_linux_port -DDONT_USE_THR_ALARM -c  -fPIC -DPIC
net.c -o .libs/net.lo
net.c: In function `my_net_init':
net.c:150: `TCP_NODELAY' undeclared (first use in this function)
net.c:150: (Each undeclared identifier is reported only once
net.c:150: for each function it appears in.)
make[2]: *** [net.lo] Error 1
make[2]: Leaving directory
`/usr/src/redhat/BUILD/mysql-3.23.7-alpha/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/mysql-3.23.7-alpha'
make: *** [all-recursive-am] Error 2
Bad exit status from /var/tmp/rpm-tmp.2003 (%build)
[1]+  Done                    emacs mysql-3.23.7-alpha.spec

Any ideas? Thank you.

Peter
--
www.alphalinux.org
Peter Petrakis         Warrior/Engineer        ppetrakis@alphalinux.org
"Oh my God! They killed Xena! You bastards!!"
"<BLAM!!> Who the hell are you!? Name's Ash <click clock> Housewares..."


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: UPDATE: DATETIME fields incorrect on alpha
  1999-12-13  2:11 UPDATE: DATETIME fields incorrect on alpha ppetrakis
@ 1999-12-13  3:32 ` Nikolaos Ntarmos
  1999-12-13 23:33   ` ppetrakis
  0 siblings, 1 reply; 3+ messages in thread
From: Nikolaos Ntarmos @ 1999-12-13  3:32 UTC (permalink / raw)
  To: axp-list


net.c: In function `my_net_init':
net.c:150: `TCP_NODELAY' undeclared (first use in this function)
net.c:150: (Each undeclared identifier is reported only once
net.c:150: for each function it appears in.)
make[2]: *** [net.lo] Error 1

TCP_NODELAY is simply defined to be 1 , provided that __KERNEL__ is defined :
#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
...
#define TCP_NODELAY     1
...
#endif /* not kernel and not glibc */

in the file $KERNEL_ROOT/include/linux/socket.h and therefore in the standard
/usr/include/linux/socket.h. All this in my 2.2.14pre9-based system. Try
defining __KERNEL__ (-D__KERNEL__) during compilation or hardcoding 1 for
TCP_NODELAY.

Hope i helped...

See ya,
Nick.

----------------------------------- 
 Ntarmos Nikolaos.                 
 Information Systems Center.       
 Technical University of Crete.    
-----------------------------------
 e-mail:   darmnik @ isc.tuc.gr    
         ccompiler @ yahoo.com     
----------------------------------- 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: UPDATE: DATETIME fields incorrect on alpha
  1999-12-13  3:32 ` Nikolaos Ntarmos
@ 1999-12-13 23:33   ` ppetrakis
  0 siblings, 0 replies; 3+ messages in thread
From: ppetrakis @ 1999-12-13 23:33 UTC (permalink / raw)
  To: axp-list; +Cc: MySQL (E-mail)



On Mon, 13 Dec 1999, Nikolaos Ntarmos wrote:
 
> TCP_NODELAY is simply defined to be 1 , provided that __KERNEL__ is defined :
> #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
> ...
> #define TCP_NODELAY     1
> ...
> #endif /* not kernel and not glibc */
> 
> in the file $KERNEL_ROOT/include/linux/socket.h and therefore in the standard
> /usr/include/linux/socket.h. All this in my 2.2.14pre9-based system. Try
> defining __KERNEL__ (-D__KERNEL__) during compilation or hardcoding 1 for
> TCP_NODELAY.
> 
> Hope i helped...

Yes you did help :-) Thank you. Here's what I did.
Turns out there was another file that was effected the same way. I patched
them as follows:

diff -uNr mysql-3.23.7-alpha-GOLD/client/net.c
mysql-3.23.7-alpha/client/net.c
--- mysql-3.23.7-alpha-GOLD/client/net.c        Mon Nov 29 14:29:51 1999
+++ mysql-3.23.7-alpha/client/net.c     Mon Dec 13 11:52:54 1999
@@ -8,6 +8,9 @@
 ** 3 byte length & 1 byte package-number.
 */
+#ifdef alpha_linux_port
+#define TCP_NODELAY 1
+#endif
 #ifdef _WIN32
 #include <winsock.h>
 #endif
diff -uNr mysql-3.23.7-alpha-GOLD/sql/net_serv.c
mysql-3.23.7-alpha/sql/net_serv.c
--- mysql-3.23.7-alpha-GOLD/sql/net_serv.c      Mon Nov 29 14:29:51 1999
+++ mysql-3.23.7-alpha/sql/net_serv.c   Mon Dec 13 13:30:12 1999
@@ -8,6 +8,9 @@
 ** 3 byte length & 1 byte package-number.
 */
+#ifdef alpha_linux_port
+#define TCP_NODELAY 1
+#endif
 #ifdef _WIN32
 #include <winsock.h>
 #endif

Since I pass -D_alpha_linux_port to enable big file support it will catch
it and make the define. (BTW it still dumps core with the
-D_alpha_linux_port flag)

Now I can get this thing to finally compile but it it still SEGV's at
startup.

I went back to the stable release of MySQL for now (since they both dump
core might as well get the one that's stable working first) and ran gdb on
the core again.

[root@voodoo:~]$ mysqld
Segmentation fault (core dumped)
[root@voodoo:~]$ gdb mysqld core
GNU gdb 4.17.0.11 with Linux support
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "alpha-redhat-linux"...
Core was generated by `mysqld'.
Program terminated with signal 11, Segmentation fault.
#0  0x1200d4208 in pthread_setcanceltype (type=1, oldtype=0x11ffffa80)
    at cancel.c:42
42        if (oldtype != NULL) *oldtype = THREAD_GETMEM(self,
p_canceltype);
(gdb) bt
#0  0x1200d4208 in pthread_setcanceltype (type=1, oldtype=0x11ffffa80)
    at cancel.c:42
#1  0x1200d3368 in fcntl (fd=0, cmd=1) at wrapsyscall.c:77
#2  0x1200ddd44 in check_standard_fds () at
../sysdeps/generic/libc-start.c:99
#3  0x1200ddf30 in __libc_start_main (main=0x120041bc0 <main>, argc=1,
    argv=0x11ffffb68, init=0x120000120 <_init>, fini=0x12013e260 <_fini>,
    rtld_fini=0, stack_end=0x11ffffb50) at
../sysdeps/generic/libc-start.c:60
Current language:  auto; currently c
(gdb) l
37      int pthread_setcanceltype(int type, int * oldtype)
38      {
39        pthread_descr self = thread_self();
40        if (type < PTHREAD_CANCEL_DEFERRED || type >
PTHREAD_CANCEL_ASYNCHRONOUS)
41          return EINVAL;
42        if (oldtype != NULL) *oldtype = THREAD_GETMEM(self,
p_canceltype);
43        THREAD_SETMEM(self, p_canceltype, type);
44        if (THREAD_GETMEM(self, p_canceled) &&
45            THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE
&&
46            THREAD_GETMEM(self, p_canceltype) ==
PTHREAD_CANCEL_ASYNCHRONOUS)
(gdb) 
...

(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/sbin/mysqld
Breakpoint 1, pthread_setcanceltype (type=1, oldtype=0x11ffffac0)
    at cancel.c:38
38      {
(gdb) cont
Continuing.
Breakpoint 2, pthread_setcanceltype (type=1, oldtype=0x11ffffac0)
    at cancel.c:40
40        if (type < PTHREAD_CANCEL_DEFERRED || type >
PTHREAD_CANCEL_ASYNCHRONOUS)
(gdb) cont
Continuing.
Breakpoint 4, pthread_setcanceltype (type=1, oldtype=0x11ffffac0)
    at cancel.c:42
42        if (oldtype != NULL) *oldtype = THREAD_GETMEM(self,
p_canceltype);
(gdb) cont
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x1200d4208 in pthread_setcanceltype (type=1, oldtype=0x11ffffac0)
    at cancel.c:42
42        if (oldtype != NULL) *oldtype = THREAD_GETMEM(self,
p_canceltype);
(gdb) cont
Continuing.
Error accessing memory address 0x120286088: No such process.


This is over my head. Any ideas?
Thanks.

Peter
--
www.alphalinux.org
Peter Petrakis         Warrior/Engineer        ppetrakis@alphalinux.org
"Oh my God! They killed Xena! You bastards!!"
"<BLAM!!> Who the hell are you!? Name's Ash <click clock> Housewares..." 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-12-13 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-12-13  2:11 UPDATE: DATETIME fields incorrect on alpha ppetrakis
1999-12-13  3:32 ` Nikolaos Ntarmos
1999-12-13 23:33   ` ppetrakis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox