]>
Commit | Line | Data |
---|---|---|
3bd189cb JR |
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
2 | <HTML> | |
3 | <HEAD> | |
4 | <TITLE> [IRCServices] Compiling and Crashing on boot under Solaris 9 | |
5 | </TITLE> | |
6 | <LINK REL="Index" HREF="index.html" > | |
7 | <LINK REL="made" HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Compiling%20and%20Crashing%20on%20boot%20under%20Solaris%209&In-Reply-To="> | |
8 | <META NAME="robots" CONTENT="index,nofollow"> | |
9 | <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> | |
10 | <LINK REL="Previous" HREF="003853.html"> | |
11 | <LINK REL="Next" HREF="003855.html"> | |
12 | </HEAD> | |
13 | <BODY BGCOLOR="#ffffff"> | |
14 | <H1>[IRCServices] Compiling and Crashing on boot under Solaris 9</H1> | |
15 | <B>Kevin Kane</B> | |
16 | <A HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Compiling%20and%20Crashing%20on%20boot%20under%20Solaris%209&In-Reply-To=" | |
17 | TITLE="[IRCServices] Compiling and Crashing on boot under Solaris 9">kane at firelion.org | |
18 | </A><BR> | |
19 | <I>Sun Jun 8 12:22:33 PDT 2003</I> | |
20 | <P><UL> | |
21 | <LI>Previous message: <A HREF="003853.html">[IRCServices] BUG: Services crash under heavy akill removal load. | |
22 | </A></li> | |
23 | <LI>Next message: <A HREF="003855.html">[IRCServices] Compiling and Crashing on boot under Solaris 9 | |
24 | </A></li> | |
25 | <LI> <B>Messages sorted by:</B> | |
26 | <a href="date.html#3854">[ date ]</a> | |
27 | <a href="thread.html#3854">[ thread ]</a> | |
28 | <a href="subject.html#3854">[ subject ]</a> | |
29 | <a href="author.html#3854">[ author ]</a> | |
30 | </LI> | |
31 | </UL> | |
32 | <HR> | |
33 | <!--beginarticle--> | |
34 | <PRE>I am attempting to use IRC Services 5.0.19. | |
35 | ||
36 | The IRCD is Unreal3.2-beta16cvs20030527. | |
37 | ||
38 | I have successfully been using IRC Services 5.0.16 with this server, | |
39 | although I had to do similar tinkering as mentioned below to get it to | |
40 | compile. But since compiled, no problems. | |
41 | ||
42 | The server is an UltraSPARC 1 (sun4u) running Solaris 9. Compiler is GCC | |
43 | 3.2.2. | |
44 | ||
45 | First, I had to add a -libs parameter to configure with "-lsocket -lnsl | |
46 | -lresolv" so that it would find hstrerror() and gethostbyname(). It seems | |
47 | to figure out that it needs -lsocket on its own, so I probably don't have | |
48 | to add it myself, but I did just to be sure. It refuses to compile | |
49 | dynamic modules, but I didn't care enough to try and correct that. I also | |
50 | had to tell Make to be sure to use bash as the shell, instead of Solaris' | |
51 | braindead /bin/sh by adding a SHELL=/usr/local/bin/bash parameter to the | |
52 | make command. After that it compiles fine. It still complains that it | |
53 | cannot find strtok, although this isn't fatal. Solaris does seem to have | |
54 | this function, however. Here is the relevant snippet from the | |
55 | configure.log when it attempts to locate strtok: | |
56 | -- | |
57 | check_strtok : >>> gcc -O2 -fno-strict-aliasing conf-tmp/test.c | |
58 | -lsocket -lsocket -lnsl -lresolv -ldl -o conf-tmp/test | |
59 | conf-tmp/test.c: In function `main': | |
60 | conf-tmp/test.c:8: warning: comparison between pointer and integer | |
61 | conf-tmp/test.c:10: warning: comparison between pointer and integer | |
62 | conf-tmp/test.c:12: warning: comparison between pointer and integer | |
63 | conf-tmp/test.c:14: warning: comparison between pointer and integer | |
64 | conf-tmp/test.c:16: warning: comparison between pointer and integer | |
65 | conf-tmp/test.c:18: warning: comparison between pointer and integer | |
66 | conf-tmp/test.c:20: `buf4' undeclared (first use in this function) | |
67 | conf-tmp/test.c:20: (Each undeclared identifier is reported only once | |
68 | conf-tmp/test.c:20: for each function it appears in.) | |
69 | conf-tmp/test.c:20: warning: comparison between pointer and integer | |
70 | conf-tmp/test.c:22: warning: comparison between pointer and integer | |
71 | check_strtok : *** Command failed (exit code 1) | |
72 | check_strtok : didn't find strtok | |
73 | -- | |
74 | ||
75 | While I'm at it, I might as well clip out the section of log of its | |
76 | attempt to use dynamic modules. But as advertised, things have worked | |
77 | fine in the past without dynamic modules: | |
78 | -- | |
79 | check_shared : found dlfcn.h in /usr/include | |
80 | check_shared : testing dlfcn method | |
81 | check_shared : >>> gcc -O2 -fno-strict-aliasing -lsocket -lsocket -lnsl | |
82 | -lresolv -ldl conf-tmp/test-dlopen.c -o conf-tmp/test | |
83 | check_shared : dlopen() found (no libs) | |
84 | check_shared : >>> gcc -rdynamic -O2 -fno-strict-aliasing -lsocket | |
85 | -lsocket -lnsl -lresolv -ldl conf-tmp/test-dlopen.c -o conf-tmp/test | |
86 | gcc: unrecognized option `-rdynamic' | |
87 | check_shared : -rdynamic works | |
88 | check_shared : >>> gcc -shared -O2 -fno-strict-aliasing -lsocket | |
89 | -lsocket -lnsl -lresolv -ldl conf-tmp/test-lib.c -o conf-tmp/test-lib.so | |
90 | Text relocation remains referenced | |
91 | against symbol offset in file | |
92 | no_such_symbol 0x0 /var/tmp//cccAI8HB.o | |
93 | no_such_symbol 0x4 /var/tmp//cccAI8HB.o | |
94 | ld: fatal: relocations remain against allocatable but non-writable | |
95 | sections | |
96 | collect2: ld returned 1 exit status | |
97 | check_shared : *** Command failed (exit code 1) | |
98 | check_shared : no -shared, aborting dlfcn test | |
99 | check_shared : static modules selected | |
100 | -- | |
101 | ||
102 | ||
103 | ||
104 | The crash occurs on starting services whenever there are database files | |
105 | present. It starts successfully the first time ever, when no databases | |
106 | yet exist. | |
107 | ||
108 | I have attempted two scenarios. I will include the verbose log entries | |
109 | and the backtrace from gdb for both circumstances. | |
110 | ||
111 | ||
112 | ||
113 | SCENARIO 1. IRC Services was already started with no database files | |
114 | present, so that it created blank files. Services is gracefully shut down | |
115 | with SIGTERM (leaving new db files behind), and then restarted. It | |
116 | segmentation faults and dumps core. | |
117 | ||
118 | Log file contents: | |
119 | -- | |
120 | [Jun 08 12:52:14.090067 2003] IRC Services 5.0.19 starting up (options: | |
121 | debug) | |
122 | [Jun 08 12:52:14.092986 2003] debug: Loading language 0 from file | |
123 | `languages/en_us' | |
124 | [Jun 08 12:52:14.240809 2003] debug: Loading language 10 from file | |
125 | `languages/nl' | |
126 | [Jun 08 12:52:14.384819 2003] debug: Loading language 6 from file | |
127 | `languages/fr' | |
128 | [Jun 08 12:52:14.538818 2003] debug: Loading language 9 from file | |
129 | `languages/de' | |
130 | [Jun 08 12:52:14.688365 2003] debug: Loading language 11 from file | |
131 | `languages/hu' | |
132 | [Jun 08 12:52:14.835368 2003] debug: Loading language 8 from file | |
133 | `languages/it' | |
134 | [Jun 08 12:52:14.946416 2003] debug: Loading language 2 from file | |
135 | `languages/ja_euc' | |
136 | [Jun 08 12:52:15.108724 2003] debug: Loading language 3 from file | |
137 | `languages/ja_sjis' | |
138 | [Jun 08 12:52:15.255023 2003] debug: Loading language 5 from file | |
139 | `languages/pt' | |
140 | [Jun 08 12:52:15.376611 2003] debug: Loading language 4 from file | |
141 | `languages/es' | |
142 | [Jun 08 12:52:15.527586 2003] debug: Loading language 7 from file | |
143 | `languages/tr' | |
144 | [Jun 08 12:52:15.671046 2003] debug: Loaded languages | |
145 | [Jun 08 12:52:15.672898 2003] debug: Loading module `protocol/unreal' | |
146 | [Jun 08 12:52:15.681838 2003] debug: Successfully loaded module | |
147 | `protocol/unreal' | |
148 | [Jun 08 12:52:15.683772 2003] debug: Loading module `database/version4' | |
149 | [Jun 08 12:52:15.693401 2003] debug: Successfully loaded module | |
150 | `database/version4' | |
151 | [Jun 08 12:52:15.695319 2003] debug: Loading module `mail/main' | |
152 | [Jun 08 12:52:15.698281 2003] debug: Successfully loaded module | |
153 | `mail/main' | |
154 | [Jun 08 12:52:15.700118 2003] debug: Loading module `mail/smtp' | |
155 | [Jun 08 12:52:15.702835 2003] debug: Successfully loaded module | |
156 | `mail/smtp' | |
157 | [Jun 08 12:52:15.704677 2003] debug: Loading module `operserv/main' | |
158 | [Jun 08 12:52:15.709453 2003] debug: Successfully loaded module | |
159 | `operserv/main' | |
160 | [Jun 08 12:52:15.711354 2003] debug: Loading module `operserv/akill' | |
161 | [Jun 08 12:52:15.715177 2003] debug: Successfully loaded module | |
162 | `operserv/akill' | |
163 | [Jun 08 12:52:15.717199 2003] debug: Loading module `operserv/news' | |
164 | [Jun 08 12:52:15.720836 2003] debug: Successfully loaded module | |
165 | `operserv/news' | |
166 | [Jun 08 12:52:15.722642 2003] debug: Loading module `operserv/sessions' | |
167 | [Jun 08 12:52:15.727185 2003] debug: Successfully loaded module | |
168 | `operserv/sessions' | |
169 | [Jun 08 12:52:15.729063 2003] debug: Loading module `operserv/sline' | |
170 | [Jun 08 12:52:15.733909 2003] debug: Successfully loaded module | |
171 | `operserv/sline' | |
172 | [Jun 08 12:52:15.735940 2003] debug: Loading module `nickserv/main' | |
173 | [Jun 08 12:52:15.742644 2003] debug: Successfully loaded module | |
174 | `nickserv/main' | |
175 | [Jun 08 12:52:15.744537 2003] debug: Loading module `nickserv/access' | |
176 | [Jun 08 12:52:15.750246 2003] debug: Successfully loaded module | |
177 | `nickserv/access' | |
178 | [Jun 08 12:52:15.752109 2003] debug: Loading module `nickserv/autojoin' | |
179 | [Jun 08 12:52:15.757868 2003] debug: Successfully loaded module | |
180 | `nickserv/autojoin' | |
181 | [Jun 08 12:52:15.759752 2003] debug: Loading module `nickserv/link' | |
182 | [Jun 08 12:52:15.765427 2003] debug: Successfully loaded module | |
183 | `nickserv/link' | |
184 | [Jun 08 12:52:15.767832 2003] debug: Loading module `memoserv/main' | |
185 | [Jun 08 12:52:15.774760 2003] debug: Successfully loaded module | |
186 | `memoserv/main' | |
187 | [Jun 08 12:52:15.776911 2003] debug: Loading module `memoserv/ignore' | |
188 | [Jun 08 12:52:15.783875 2003] debug: Successfully loaded module | |
189 | `memoserv/ignore' | |
190 | [Jun 08 12:52:15.785721 2003] debug: Loading module `statserv/main' | |
191 | -- | |
192 | ||
193 | Output from gdb: | |
194 | -- | |
195 | ><i> gdb ../bin/ircservices core | |
196 | </I>GNU gdb 5.3 | |
197 | Copyright 2002 Free Software Foundation, Inc. | |
198 | GDB is free software, covered by the GNU General Public License, and you | |
199 | are welcome to change it and/or distribute copies of it under certain | |
200 | conditions. | |
201 | Type "show copying" to see the conditions. | |
202 | There is absolutely no warranty for GDB. Type "show warranty" for | |
203 | details. | |
204 | This GDB was configured as "sparc-sun-solaris2.9"... | |
205 | Core was generated by `./ircservices -debug'. | |
206 | Program terminated with signal 11, Segmentation fault. | |
207 | Reading symbols from /usr/lib/libsocket.so.1...done. | |
208 | Loaded symbols for /usr/lib/libsocket.so.1 | |
209 | Reading symbols from /usr/lib/libnsl.so.1...done. | |
210 | Loaded symbols for /usr/lib/libnsl.so.1 | |
211 | Reading symbols from /usr/lib/libresolv.so.2...done. | |
212 | Loaded symbols for /usr/lib/libresolv.so.2 | |
213 | Reading symbols from /usr/lib/libdl.so.1...done. | |
214 | Loaded symbols for /usr/lib/libdl.so.1 | |
215 | Reading symbols from /usr/lib/libc.so.1...done. | |
216 | Loaded symbols for /usr/lib/libc.so.1 | |
217 | Reading symbols from /usr/lib/libmp.so.2...done. | |
218 | Loaded symbols for /usr/lib/libmp.so.2 | |
219 | Reading symbols from /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1...done. | |
220 | Loaded symbols for /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1 | |
221 | #0 0x0003b380 in load_one_serverstats (f=0x25e468) at version4.c:2163 | |
222 | 2163 SAFE(read_int32(&tmp32, f)); /* t_quit */ | |
223 | (gdb) bt | |
224 | #0 0x0003b380 in load_one_serverstats (f=0x25e468) at version4.c:2163 | |
225 | #1 0x0003b50c in open_statserv_db (dbname=0x25dd78 "stats.db") | |
226 | at version4.c:2219 | |
227 | #2 0x00072f6c in init_module_statserv_main (module_=0x0) at main.c:622 | |
228 | #3 0x00023c08 in internal_init_module (module=0x1) at modules.c:363 | |
229 | #4 0x00023ce8 in load_module (modulename=0x1065d0 "statserv/main") | |
230 | at modules.c:392 | |
231 | #5 0x0001eb0c in init (ac=2, av=0xffbff74c) at init.c:826 | |
232 | #6 0x00020ec0 in main (ac=2, av=0xffbff74c, envp=0x0) at main.c:192 | |
233 | -- | |
234 | ||
235 | ||
236 | SCENARIO 2. IRC Services is started with the database files that have | |
237 | been correctly working under version 5.0.16. This time, it reports a bus | |
238 | error upon booting, and coredumps. The database files are pretty small | |
239 | because it's a private server with only a few years -- 3 nicks, no | |
240 | channels registered, and some logon news. | |
241 | ||
242 | Output from the log file: | |
243 | -- | |
244 | [Jun 08 12:58:35.059589 2003] IRC Services 5.0.19 starting up (options: | |
245 | debug) | |
246 | [Jun 08 12:58:35.062554 2003] debug: Loading language 0 from file | |
247 | `languages/en_us' | |
248 | [Jun 08 12:58:35.218619 2003] debug: Loading language 10 from file | |
249 | `languages/nl' | |
250 | [Jun 08 12:58:35.370950 2003] debug: Loading language 6 from file | |
251 | `languages/fr' | |
252 | [Jun 08 12:58:35.525613 2003] debug: Loading language 9 from file | |
253 | `languages/de' | |
254 | [Jun 08 12:58:35.688053 2003] debug: Loading language 11 from file | |
255 | `languages/hu' | |
256 | [Jun 08 12:58:35.840262 2003] debug: Loading language 8 from file | |
257 | `languages/it' | |
258 | [Jun 08 12:58:35.959109 2003] debug: Loading language 2 from file | |
259 | `languages/ja_euc' | |
260 | [Jun 08 12:58:36.110231 2003] debug: Loading language 3 from file | |
261 | `languages/ja_sjis' | |
262 | [Jun 08 12:58:36.267636 2003] debug: Loading language 5 from file | |
263 | `languages/pt' | |
264 | [Jun 08 12:58:36.393828 2003] debug: Loading language 4 from file | |
265 | `languages/es' | |
266 | [Jun 08 12:58:36.547625 2003] debug: Loading language 7 from file | |
267 | `languages/tr' | |
268 | [Jun 08 12:58:36.707242 2003] debug: Loaded languages | |
269 | [Jun 08 12:58:36.709075 2003] debug: Loading module `protocol/unreal' | |
270 | [Jun 08 12:58:36.717808 2003] debug: Successfully loaded module | |
271 | `protocol/unreal' | |
272 | [Jun 08 12:58:36.719731 2003] debug: Loading module `database/version4' | |
273 | [Jun 08 12:58:36.729420 2003] debug: Successfully loaded module | |
274 | `database/version4' | |
275 | [Jun 08 12:58:36.731331 2003] debug: Loading module `mail/main' | |
276 | [Jun 08 12:58:36.734309 2003] debug: Successfully loaded module | |
277 | `mail/main' | |
278 | [Jun 08 12:58:36.736161 2003] debug: Loading module `mail/smtp' | |
279 | [Jun 08 12:58:36.738885 2003] debug: Successfully loaded module | |
280 | `mail/smtp' | |
281 | [Jun 08 12:58:36.740750 2003] debug: Loading module `operserv/main' | |
282 | [Jun 08 12:58:36.745704 2003] debug: Successfully loaded module | |
283 | `operserv/main' | |
284 | [Jun 08 12:58:36.747718 2003] debug: Loading module `operserv/akill' | |
285 | [Jun 08 12:58:36.751530 2003] debug: Successfully loaded module | |
286 | `operserv/akill' | |
287 | [Jun 08 12:58:36.753503 2003] debug: Loading module `operserv/news' | |
288 | [Jun 08 12:58:36.757556 2003] debug: Successfully loaded module | |
289 | `operserv/news' | |
290 | [Jun 08 12:58:36.759519 2003] debug: Loading module `operserv/sessions' | |
291 | [Jun 08 12:58:36.764352 2003] debug: Successfully loaded module | |
292 | `operserv/sessions' | |
293 | [Jun 08 12:58:36.766345 2003] debug: Loading module `operserv/sline' | |
294 | [Jun 08 12:58:36.771531 2003] debug: Successfully loaded module | |
295 | `operserv/sline' | |
296 | [Jun 08 12:58:36.773604 2003] debug: Loading module `nickserv/main' | |
297 | -- | |
298 | ||
299 | Output from GDB: | |
300 | -- | |
301 | GNU gdb 5.3 | |
302 | Copyright 2002 Free Software Foundation, Inc. | |
303 | GDB is free software, covered by the GNU General Public License, and you | |
304 | are | |
305 | welcome to change it and/or distribute copies of it under certain | |
306 | conditions. | |
307 | Type "show copying" to see the conditions. | |
308 | There is absolutely no warranty for GDB. Type "show warranty" for | |
309 | details. | |
310 | This GDB was configured as "sparc-sun-solaris2.9"... | |
311 | Core was generated by `./ircservices -debug'. | |
312 | Program terminated with signal 10, Bus error. | |
313 | Reading symbols from /usr/lib/libsocket.so.1...done. | |
314 | Loaded symbols for /usr/lib/libsocket.so.1 | |
315 | Reading symbols from /usr/lib/libnsl.so.1...done. | |
316 | Loaded symbols for /usr/lib/libnsl.so.1 | |
317 | Reading symbols from /usr/lib/libresolv.so.2...done. | |
318 | Loaded symbols for /usr/lib/libresolv.so.2 | |
319 | Reading symbols from /usr/lib/libdl.so.1...done. | |
320 | Loaded symbols for /usr/lib/libdl.so.1 | |
321 | Reading symbols from /usr/lib/libc.so.1...done. | |
322 | Loaded symbols for /usr/lib/libc.so.1 | |
323 | Reading symbols from /usr/lib/libmp.so.2...done. | |
324 | Loaded symbols for /usr/lib/libmp.so.2 | |
325 | Reading symbols from /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1...done. | |
326 | Loaded symbols for /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1 | |
327 | #0 open_nick_db (dbname=0x1e7820 "nick.db") at version4.c:478 | |
328 | 478 } while (root->last_realmask); | |
329 | (gdb) bt | |
330 | #0 open_nick_db (dbname=0x1e7820 "nick.db") at version4.c:478 | |
331 | #1 0x00057688 in init_module_nickserv_main (module_=0xa7c00) at | |
332 | main.c:1696 | |
333 | #2 0x00023c08 in internal_init_module (module=0x1) at modules.c:363 | |
334 | #3 0x00023ce8 in load_module (modulename=0x106558 "nickserv/main") | |
335 | at modules.c:392 | |
336 | #4 0x0001eb0c in init (ac=2, av=0xffbff74c) at init.c:826 | |
337 | #5 0x00020ec0 in main (ac=2, av=0xffbff74c, envp=0x0) at main.c:192 | |
338 | -- | |
339 | ||
340 | Let me know if you need more information, and thanks. | |
341 | ||
342 | Kevin Kane <<A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">kane at firelion.org</A>> | |
343 | </PRE> | |
344 | ||
345 | <!--endarticle--> | |
346 | <HR> | |
347 | <P><UL> | |
348 | <!--threads--> | |
349 | <LI>Previous message: <A HREF="003853.html">[IRCServices] BUG: Services crash under heavy akill removal load. | |
350 | </A></li> | |
351 | <LI>Next message: <A HREF="003855.html">[IRCServices] Compiling and Crashing on boot under Solaris 9 | |
352 | </A></li> | |
353 | <LI> <B>Messages sorted by:</B> | |
354 | <a href="date.html#3854">[ date ]</a> | |
355 | <a href="thread.html#3854">[ thread ]</a> | |
356 | <a href="subject.html#3854">[ subject ]</a> | |
357 | <a href="author.html#3854">[ author ]</a> | |
358 | </LI> | |
359 | </UL> | |
360 | ||
361 | </body></html> |