Back
[00:15:59] <andypugh> I hate this stage of testing "If I was a psychopath who knew my code as well as I do, how would I break it?"
[00:40:18] <skunkworks> heh
[00:45:57] <andypugh> Current way to break it is to connect nothing to the zeroth instance, and something to the first. So as to fill a whole instance with null pointers.
[00:50:27] <SWPadnos> connect nothing in HAL?
[00:50:39] <cradek> sounds like very competent testing to me
[00:52:11] <SWPadnos> it is surprisingly difficult to script the preparation (partitioning, making bootable, installing OS image) of a new hard drive
[00:52:46] <cradek> nah... (he says, without trying it first)
[00:53:16] <cradek> actually I've done it over multiple decades and OSes
[00:53:30] <cradek> you're not talking about windows or some other hostile OS are you?
[00:54:22] <SWPadnos> it seems particularly hard when you have a combination of (a) not the same size target drive (smaller by a few M) and (b) not having the same hard disk type on the host OS as the target will use
[00:54:37] <SWPadnos> Ubuntu 6.06 is the image, on an IDE drive, using GRUB
[00:55:00] <SWPadnos> installing from a partimage image, on an 8.04 machine with SATA drives
[00:55:07] <cradek> I don't know what partimage is
[00:55:10] <SWPadnos> (installing to a drive connected via USB)
[00:55:20] <cradek> I've always used dump and restore, or cpio if those are unavailable
[00:55:39] <SWPadnos> it's a backup/restore tool that doesn't waste space for unused areas of the partition
[00:56:12] <SWPadnos> dump/restore to the disk itself, or a partition on the disk?
[00:56:16] <cradek> that's a feature of every backup/restore tool...
[00:56:24] <SWPadnos> yes
[00:56:24] <cradek> each partition needs its own dump
[00:56:25] <SWPadnos> vs. dd
[00:56:37] <cradek> well sure, dd is not a backup/restore tool
[00:56:39] <SWPadnos> ok, any pointers on making the disk bootable in the first place?
[00:56:41] <SWPadnos> heh
[00:57:01] <cradek> isn't it something like just grub-install '(hdX)'
[00:57:27] <SWPadnos> that doesn't work when the host system has a different drive type than the target
[00:57:33] <SWPadnos> in my very recent experience :)
[00:57:39] <cradek> ew
[00:57:42] <SWPadnos> yep
[00:58:04] <cradek> I'm not really a grub expert (and have probably always had relatively homogenous systems when doing this)
[00:58:05] <SWPadnos> I ended up with the target IDE drive thinking it was supposed to be booting from sda
[00:58:12] <cradek> oh right, that mess
[00:58:14] <SWPadnos> instead of hda
[00:58:15] <cradek> I've seen that
[00:58:16] <SWPadnos> yep
[01:00:01] <SWPadnos> I managed to get it to work (I think), by partitioning with parted (so grub-install sees partitions to install to), running grub-install, dd'ing the first sector of the original disk (previously saved, before I accidentally wiped that disk out today) to the new disk, re-partitioning, then restoring with partimage, fscking, and resizing the result
[01:01:01] <SWPadnos> I still had to manually change some files on the target, like hosts, hostname, and network/interfaces (since those needed to be unique)
[01:01:07] <SWPadnos> yay! it worked
[01:01:11] <cradek> yay!
[01:01:20] <SWPadnos> I don't have to bring these drives and a computer to Wichita!
[01:01:50] <SWPadnos> it finally worked on the last drive, of course (the other two being not quite as automated)
[01:02:35] <SWPadnos> now all I have to do is test all those analog boards tonight
[03:02:28] <jepler> libnml/cms/cmsdiag.cc:dpi->rcslib_ver = (lib_major_version + (lib_minor_version * 1e-3));
[03:02:37] <jepler> yeah, that's exactly how I'd choose to represent version numbers!
[03:02:49] <jepler> well, depending how many digits there are, anyway
[03:02:49] <jepler> libnml/cms/cmsdiag.cc:dpi->rcslib_ver = (lib_major_version + (lib_minor_version * 1e-2));
[13:03:54] <jepler> if (!ntohl(*((u_long *) temp_buffer) + 1)) {
[13:05:17] <SWPadnos> if (what?)
[13:05:24] <jepler> that's precisely what I'd like to figure out
[13:06:02] <SWPadnos> if temp_buffer =-1 maybe?
[13:06:08] <SWPadnos> ==, that is
[13:06:11] <jepler> does it really call ntohl(x+1) or am I getting it wrong?
[13:06:25] <SWPadnos> I think it does
[13:06:45] <jepler> x = *((u_long *) temp_buffer);
[13:06:45] <jepler> t = ntohl(x + 1);
[13:06:46] <jepler> if (!t) { ... }
[13:06:48] <SWPadnos> no, it's temp_buffer[1]
[13:07:03] <SWPadnos> maybe
[13:07:31] <SWPadnos> ok, yes, it's checking to see if the buffer value is -1
[13:07:40] <SWPadnos> in a most stupid way, but nonetheless
[13:11:34] <jepler> I also want to believe it's checking for -1, but I'm pretty sure that's not what's written
[13:12:04] <jepler> the + 1 should be outside the ntohl
[13:12:39] <SWPadnos> yes, that could be a bug on big-endian systems (or non-network-byte-order ones anyway)
[13:15:54] <jepler> struct REMOTE_SET_SUBSCRIPTION_REPLY:public REMOTE_CMS_REPLY {
[13:15:54] <jepler> int success; // 1 = logged in, 0 = not
[13:16:21] <SWPadnos> well, maybe booleans didn't exist back then
[13:16:21] <jepler> .. which doesn't match the documentation, assuming I've matched up the right bits of code
[13:16:47] <SWPadnos> should I bring an RCS book to fest?
[13:17:16] <jepler> oh certainly not if it's any trouble
[13:17:32] <SWPadnos> I think I can find it easily, and it's small enough to fit in my checked bag
[13:18:01] <SWPadnos> yep, here it is now
[13:20:14] <jepler> I'm pretty sure this code I'm looking at is code we seldom exercise -- tcp remote memory
[13:20:31] <jepler> I really just want to fix the warnings we get when we turn off -fno-strict-aliasing
[13:21:50] <SWPadnos> if you think it could be useful (given that you can look at the actual code), I'll bring the book
[13:22:04] <SWPadnos> it shouldn't even displace the chocolate-dipped macaroons :)
[13:22:13] <jepler> I'll probably be borerd of the whole thing by the time I'm in wichita
[13:22:18] <jepler> to be honest
[13:22:27] <SWPadnos> like, tonight? :)
[13:22:57] <SWPadnos> damn. what was it that I thought should be added to "test this axis"?
[13:23:10] <SWPadnos> oh, enable output if defined
[13:25:47] <jepler> yeah, like tonight
[13:30:19] <jepler> when in doubt, write lots of words in the changelog.
http://emergent.unpy.net/files/sandbox/0001-fix-apparent-wrong-test-of-SET_SUBSCRIPTION_REQUEST.patch
[13:31:21] <jepler> (where getbe32 was introduced by an earlier commit I haven't pushed yet, but gets a big-endian value from a buffer)
[13:31:54] <SWPadnos> is that better than ntohl?
[13:31:58] <SWPadnos> (out of curiosity)
[13:32:27] <jepler> well, the actual problem (for gcc -fstrict-aliasing) is the cast of the char* buffer to u_long
[13:32:51] <SWPadnos> the method of testing for -1 actually makes sense, since the value returned by ntohl is unsigned
[13:33:09] <jepler> the other actual problem is that on amd64 systems, u_long is 8 bytes, so u_long has to go and be replaced by uint32_t
[13:33:13] <SWPadnos> though checking for -1 may not make sense in itself
[13:33:35] <jepler> getbe32 is implemented in terms of ntohl
[13:33:36] <jepler> +static uint32_t getbe32(char *addr) {
[13:33:36] <jepler> + uint32_t val;
[13:33:36] <jepler> + memcpy(&val, addr, sizeof(val));
[13:33:36] <jepler> + return ntohl(val);
[13:33:36] <SWPadnos> yeaeh, 64-bit cleanliness did cross my mind as well
[13:33:39] <jepler> +}
[13:33:50] <SWPadnos> ah
[13:34:01] <jepler> there are still data sizing problems -- in REMOTE_SET_SUBSCRIPTION_REPLY, success is an int
[13:34:30] <SWPadnos> icky
[13:34:36] <micges> jepler: did you check how it's done in latest rcslib source ?
[13:34:37] <jepler> but on both the platforms we care about (x86 and amd64) sizeof(int) == sizeof(uint32_t)
[13:34:38] <SWPadnos> NOT_EQUAL SUCCESS
[13:35:05] <jepler> micges: no.
[13:35:47] <jepler> hah > With newer versions of GNU tar one can uncompress and extract with one command."tar -xzf rcslib-2010.10.15.tar"
[13:35:56] <jepler> it must be a decade or more since tar couldn't do that
[13:36:24] <SWPadnos> maybe two
[13:36:56] <jepler> the type of the field is still int: int success; // 1 = logged in, 0 = not
[13:38:58] <jepler> to access the buffers they now do something similar to what I invented
[13:38:59] <jepler> ntoh_uint32_array_get(ctp->temp_buffer,3);
[13:39:59] <jepler> ah, here's the corresponding bit:
[13:39:59] <jepler> if (!ntoh_uint32_array_get(temp_buffer,1))
[13:40:09] <jepler> + if (!getbe32(temp_buffer)) {
[13:40:15] <jepler> so my fix matches what they changed in the meantime
[13:40:22] <jepler> micges: thanks for the nudge to look at upstream
[13:40:44] <micges> np
[13:41:12] <jepler> errrrr no, it's looking at the 1th item, not the 0th item
[13:41:22] <jepler> so that'd be getbe32(temp_buffer + 4) in my lingo
[13:41:26] <micges> maybe we all be bored sometime enough to update whole nml implementation in emc
[13:45:50] <SWPadnos> huh. so maybe the "+1" was supposed to be temp_buffer[1], not (*temp_buffer)+1
[13:47:00] <jepler> - *((u_long *) temp_buffer + 1) = htonl(server->read_reply->status);
[13:47:04] <jepler> right, like this one ^^
[13:49:04] <CIA-2> EMC: 03jepler 07master * rd214ba755156 10/src/libnml/ (buffer/tcpmem.cc cms/tcp_srv.cc): libnml: avoid strict aliasing warnings
[13:49:05] <CIA-2> EMC: 03jepler 07master * r3a747870dbb1 10/src/libnml/buffer/tcpmem.cc: fix apparent wrong test of SET_SUBSCRIPTION_REQUEST
[13:49:08] <CIA-2> EMC: 03jepler 07master * r3c9ed4c77a66 10/src/Makefile: build: -fno-strict-aliasing mostly not needed anymore
[13:49:13] <jepler> off to the office
[13:49:58] <CIA-2> EMC: 03jepler 07master * rb23329e907d5 10/src/hal/utils/comp.g: comp: avoid aliasing warnings
[14:04:41] <CIA-2> EMC: 03micges 07v2.4_branch * r473ef030b8f8 10/src/emc/iotask/ioControl.cc: iotask: Fix M61 Qn not loading tool in toolTable[0]
[15:47:48] <mshaver> Why does AXIS have a "File/Save gcode as..." option? I ask because it uses an external editor, and no "MDI Store" function so I don't see how this would be used.
[15:48:19] <cradek> you can save the result of running an input filter
[15:51:12] <mshaver> OK, that makes sense. I have a client that doesn't want operators to be able to modify the gcode. I was able to do this by making gedit only executable by root, thus password protecting it. Eztrol has an option to disable it's built in editor, so this combination gave them more or less what they wanted. But I also wanted to see if they could move to AXIS.
[15:52:14] <mshaver> And before you say it, I know. A determined, skillful user can do anything they want... This is just an attempt to frustrate the basic tinkerer.
[15:53:34] <cradek> haha, that's got to be the silliest way ... oh you know that don't you
[15:54:20] <mshaver> It was what I could think of when I was on the spot. Better ideas?
[15:55:05] <cradek> I can only use my powers for good, never for evil
[15:55:29] <micges> emc master doesn't compile on 8.04
[15:55:31] <cradek> sometimes a silly response is the right response to a silly request
[15:55:52] <skunkworks> I didn't think 8.04 was supported anymore...
[15:55:54] <cradek> micges: the buildbot error?
[15:55:54] <mshaver> To paraphrase Megadeth, "Good sells, but who's buying".
[15:56:25] <micges> I've just pull git on 8.04 make clean make and it's stops
[15:56:44] <cradek> micges: um can you fix it?
[15:57:50] <micges> maybe
[15:58:36] <micges> skunkworks: 8.04 will be supported next 6 months at least
[16:05:34] <jepler> i broke 8.04 recently
[16:05:57] <jepler> officially we don't plan to do post-2.4 on 8.04.
[16:06:18] <jepler> but i'll look at fixing it
[16:07:28] <micges> I think we should try to fully support 8.04 during it's support by ubuntu team
[16:07:54] <cradek> hm, but isn't even dapper still supported?
[16:08:42] <micges> yes, server version
[16:08:53] <micges> desktop is supported 3 years
[16:09:56] <cradek> just to be clear, are you saying that we should release 2.5 for hardy, or we should make sure master still builds on hardy, or do you mean something else?
[16:10:07] <cradek> I am asking what you mean by "fully support"
[16:10:46] <skunkworks> I thought we where talking dapper drake. (sorry)
[16:11:09] <micges> make sure that master compiles
[16:11:32] <cradek> ok, that doesn't sound too hard
[16:16:44] <micges> cool
[16:56:59] <jepler> I have the (untested) patch to fix the recent ->ip compile problem
[16:57:17] <jepler> I'll push it once I figure out which virtual machine I left it on, and have tested it actually fixes the dapper/i386 compile problem.
[16:57:20] <jepler> er, hardy/i386
[16:59:12] <micges> jepler: your fix is simmilar to this? :
http://pastebin.com/1WrG3b4h
[16:59:47] <jepler> yes, similar. there's actually a third possibility for old kernels and x86_64 systems..
[17:00:48] <jepler> I also found 2.6.24 as the cutoff for the change
[17:02:15] <micges> cool
[17:02:29] <jepler> I wrote it this way instead
[17:02:30] <jepler> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24)
[17:02:30] <jepler> +#define IP(x) ((x)->ip)
[17:02:32] <jepler> ...
[17:02:36] <jepler> - self, task, vec, signo, regs->ip);
[17:02:36] <jepler> + self, task, vec, signo, IP(regs));
[17:03:00] <jepler> with 3 different possibilities for IP
[17:03:28] <micges> what is 3rd possibility ?
[17:03:52] <jepler> ->rip for amd64 systems on old kernels
[17:04:13] <micges> oh
[17:04:45] <jepler> http://emergent.unpy.net/files/sandbox/0001-fix-compile-on-kernels-2.6.24-and-older.patch
[17:12:09] <micges> works for me
[17:14:32] <jepler> thanks for testing
[17:15:01] <jepler> instead of waiting to get this vm set up to build emc2 I'll just go ahead and push based on your testing
[17:17:08] <micges> sure
[17:17:15] <micges> go ahead
[17:17:21] <CIA-2> EMC: 03jepler 07master * r9c59db0f001b 10/src/Makefile: remove inaccurate comment
[17:17:21] <jepler> thanks again
[17:17:23] <CIA-2> EMC: 03jepler 07master * rdd919dd5b925 10/src/rtapi/rtai_rtapi.c: fix compile on kernels 2.6.24 and older
[17:28:25] <jepler> anyone know if the kernel coding standard still forbids declarations after statements? (e.g., { foo(); int j=3; ... })
[17:28:40] <jepler> I skimmed the relevant document but missed it saying one way or the other
[17:50:53] <jepler> weird, I'm getting a linker error over here
[17:50:54] <jepler> /usr/bin/ld: objects/emc/usr_intf/xemc.o: in function toolSetOffsetTabAction(_WidgetRec*, _XEvent*, char**, unsigned int*):emc/usr_intf/xemc.cc:1279: error: undefined reference to 'XtStrings'
[18:08:53] <psha> jepler: incompatible X headers and libs?
[18:09:54] <psha> or missing -lsomething flag :)
[18:12:24] <psha> for me it's -lXmu
[19:11:30] <jepler> psha: I'm sure it's something like that, I'm just confused why it's a recent link error
[19:12:54] <jepler> but it must be a system change, not an emc change, because it affects v2.4.5 now too
[19:17:06] <jepler> ok, that's weird: the problem is that I installed binutils-gold
[19:17:23] <jepler> xemc will link with -fuse-ld=bfd but not with -fuse-ld=gold
[19:18:43] <jepler> $ g++ -L/usr/local/jepler/src/emc2.4/lib -Wl,-rpath,/usr/local/jepler/src/emc2.4/lib -o ../bin/xemc -Wall -g -I. -I/usr/local/jepler/src/emc2.4/src/include -DULAPI -D_GNU_SOURCE -Os -DLOCALE_DIR=\"/usr/share/locale\" -DPACKAGE=\"emc2\" objects/emc/usr_intf/xemc.o ../lib/libemc.a ../lib/libnml.so.0 ../lib/libemcini.so.0 -lSM -lICE -lXaw -lX11 -fuse-ld=bfd -Wl,-y,XtStrings
[19:19:29] <jepler> objects/emc/usr_intf/xemc.o: reference to XtStrings
[19:19:29] <jepler> /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libXaw.so: reference to XtStrings
[19:19:29] <jepler> /usr/lib/libXt.so.6: definition of XtStrings
[19:19:29] <jepler> /usr/lib/libXmu.so.6: reference to XtStrings
[19:20:38] <jepler> the bfd linker is including Xt and Xmu even though they're not explicitly on the commandline
[19:20:46] <jepler> while ld.gold doesn't seem t
[19:20:47] <jepler> o
[20:16:14] <CIA-2> EMC: 03jepler 07master * r0e56b26e1c3f 10/src/Makefile: fix requirement of -fno-stack-protector
[21:12:22] <micges> my fix for m61 wasn't full
[21:13:03] <micges> jepler: after m61 q3 task know about current tool offset but interpreter doesn't
[21:13:29] <micges> this is only easy fix that comes in my mind:
http://pastebin.com/snR6dY8D
[21:13:42] <micges> jepler: can it be done in that way?
[21:57:47] <cradek> m61 is silly and if you find it's not trivial to fix, it might be better to take a second shot at fixing the actual problem instead
[21:58:36] <cradek> making nonrandom tc (optionally) remember the spindle tool would not be too hard, now that random does it just fine
[21:59:51] <cradek> ... just my 2c.
[22:41:09] <skunkworks> cradek: shouldn't you be driving?
[22:44:23] <cradek> I am...
[22:45:06] <cradek> almost there.
[22:54:07] <micges> cradek: easiest way imo is to change m61 to m6.1 and use toolchanger execution path with addition of two or three if's between
[22:54:48] <micges> (more less)