Feed for discussion OSTech in project QNX Operating System. http://community.qnx.com/sf/discussion/do/listTopics/projects.core_os/discussion.newcode Posts for OSTech post120940: Re: SLOG2 Buffer Size QNX7 http://community.qnx.com/sf/go/post120940 Hey John, wanted to take a chance to thank you for your input. Your suggestions helped me solve my problem. I ended up using slog2_parse_all(DYNAMIC). I realized this after the fact, but calling this function does not return (unless you return a non-zero value from your user-defined callback), and the user-defined callback gets called from within whatever thread context you execute it, where you can process each new log entry. This works well for me, I can just throw new logs into my own local ring buffer and defer disk writes (log persistence) with another thread (which has read-access to the rb). Mon, 14 Sep 2020 08:31:08 GMT http://community.qnx.com/sf/go/post120940 Alex Martir 2020-09-14T08:31:08Z post120939: Re: SLOG2 Buffer Size QNX7 http://community.qnx.com/sf/go/post120939 It's the same as starting slog2info with the .-w arg. If you are only interested in certain buffers you can allso pass in a list similar to the slog2info -b argument. Fri, 11 Sep 2020 22:25:21 GMT http://community.qnx.com/sf/go/post120939 John Kearney 2020-09-11T22:25:21Z post120938: Re: SLOG2 Buffer Size QNX7 http://community.qnx.com/sf/go/post120938 Thanks for the reply. Hmm, this is interesting. So PARSE_DYNAMIC is intended for extracting logs that are being actively written by slog2 by other processes? You would get a callback after every new log? Thanks Fri, 11 Sep 2020 21:59:33 GMT http://community.qnx.com/sf/go/post120938 Alex Martir 2020-09-11T21:59:33Z post120932: Re: SLOG2 Buffer Size QNX7 http://community.qnx.com/sf/go/post120932 For that you are better off using something like. /** * callback function that writes each log line to the file * @param info populated slog2_packet_info_t struct * @param payload data * @param param this must be a callback_param_t pointer */ int my_callback( slog2_packet_info_t *info, void *payload, void *callback_param ) { printf("time:%"PRIx64" severity:%u code:%u fname:%s bname:%s pid:%i tid:%i msg:%s\n", info->timestamp, info->severity, info->code, info->file_name, info->buffer_name, info->owner_pid, info->thread_id, (char*)payload); return 0; } slog2_packet_info_t packet_info = SLOG2_PACKET_INFO_INIT; slog2_parse_all( SLOG2_PARSE_FLAGS_DYNAMIC, NULL, NULL, &packet_info, my_callback, NULL ); http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.lib_ref/topic/s/slog2_parse_all.html or just redirect the slog2info output to a file. Fri, 11 Sep 2020 12:13:23 GMT http://community.qnx.com/sf/go/post120932 John Kearney 2020-09-11T12:13:23Z post120928: Re: SLOG2 Buffer Size QNX7 http://community.qnx.com/sf/go/post120928 If you wanted to implement some sort of ping pong buffer so that you could save slog2 to disk, you'd have to know when the front buffer was getting close to being full, then swap buffers so that logging can continue, and now you could save the back buffer, and so on (since saving to disk is a blocking operation and could take a while). Thu, 10 Sep 2020 22:30:49 GMT http://community.qnx.com/sf/go/post120928 Alex Martir 2020-09-10T22:30:49Z post120927: Re: SLOG2 Buffer Size QNX7 http://community.qnx.com/sf/go/post120927 Those are ringbuffers so I'm not sure what sense it would make to know that? They will always be full except at startup. Thu, 10 Sep 2020 21:07:18 GMT http://community.qnx.com/sf/go/post120927 John Kearney 2020-09-10T21:07:18Z post120926: SLOG2 Buffer Size QNX7 http://community.qnx.com/sf/go/post120926 Hi, is there a way to know the current size (not the capacity or max size, but how much has been used) of the buffer in an slog2 handle? Following some of the examples in the site, it's possible to extract each individual log by - Calling slog2_open_log(...) - Calling slog2_get_log_info(...) - Then you can get buffer_info But there's only max capacity, and no current size of the buffer exposed. There's a size member in the structure, but it only represents the size of the buffer_info struct itself, and not the size of the buffer. Thanks in advance! Thu, 10 Sep 2020 20:22:08 GMT http://community.qnx.com/sf/go/post120926 Alex Martir 2020-09-10T20:22:08Z post120920: Logging in QNX 6.5 http://community.qnx.com/sf/go/post120920 Hello! Can someone tell me on my question: There is a need to receive security events from the QNX 6.5 OS like enter / exit the user, execute "su", etc. Is it possible to collect similar events? I don't see anything similar use 'sloginfo'. Is there an analogue of audit in Linux? Is it possible to open the logs that 'slogger' collects not only through the 'sloginfo' utility, but with a regular text editor? Thu, 03 Sep 2020 07:27:51 GMT http://community.qnx.com/sf/go/post120920 Roman Artyuhov 2020-09-03T07:27:51Z post120917: Per client notification from resource manager? http://community.qnx.com/sf/go/post120917 I have a resource manager that gathers data at modest rates from an A/D (as in 500Hz). It's high enough that I'd rather only notify clients when an event happens and have them come grab relevant data and not send all samples to all clients. For example, each client might specify a trigger level for a signal crossing. I'd like to support io_notify in this resource manager, because some clients will use select(). The io_notify approach is well explained in the documentation and for the standard iofunc_notify_trigger, this works well. My question is, if each client has its own OCB in the resource manager (which I've expanded to include this info) and I've added a list of all open clients (OCBs) in the device attribute (again, all nicely explained in the docs!), then is there a proper way to call iofunc_notify_trigger() on a per client basis, because not all clients will need notification at the same time. It seems like the "strict" version is what I'm looking for, but it wants a ctp - can I get this from the OCB? (I think I know how to do this in a QNX specific way with MsgDeliverEvent, but at least for some clients, I'd like to stick to the POSIX io_notify). Thanks! Mon, 31 Aug 2020 14:01:46 GMT http://community.qnx.com/sf/go/post120917 David Sheinberg 2020-08-31T14:01:46Z post120916: Re: select() vs ionotify() http://community.qnx.com/sf/go/post120916 I'll find a place to mention this in the docs. > Your call to MsgRegisterEvent() is incorrect. This is a tricky point when > using pulse events, and you are not the first one to have got it wrong. > When you initialize the pulse event you give it the connection ID on which to > deliver the pulse, in your case 'coid'. However, the connection ID argument to > MsgRegisterEvent() is used to identify the server that is permitted to > deliver the event (to prevent malicious servers from delivering unauthorized > events). You passed 'coid', but that one is not connected to the server. In > your case you should pass 'fd'. > > --Elad Mon, 31 Aug 2020 11:03:28 GMT http://community.qnx.com/sf/go/post120916 Steve Reid 2020-08-31T11:03:28Z post120915: Re: select() vs ionotify() http://community.qnx.com/sf/go/post120915 Thank you so much! Indeed it works now! And just to close the loop on this thread, I'd like to drop this "ionotification" into a second resource manager, which will provide "cooked" outputs to other clients, having processed data from the original resource manager. Does the following seem like a reasonable way to connect the event into the resource manager / dispatch framework? I think it should make a callback to a function called process_data() when the pulse arrives (passing a pointer to my own data in &client_info)? struct sigevent event; /* Initialize an event structure, and attach a pulse to it */ event.sigev_code = pulse_attach(dpp, MSG_FLAG_ALLOC_PULSE, 0, &process_data, &client_info); if(event.sigev_code == -1) { fprintf(stderr, "Unable to attach notify pulse.\n"); return EXIT_FAILURE; } /* Connect to our channel */ event.sigev_coid = message_connect(dpp, MSG_FLAG_SIDE_CHANNEL); if(event.sigev_coid == -1) { fprintf(stderr, "Unable to attach to channel.\n"); return EXIT_FAILURE; } event.sigev_notify = SIGEV_PULSE; event.sigev_priority = -1; MsgRegisterEvent(&event, fd); ionotify(fd, _NOTIFY_ACTION_POLLARM, _NOTIFY_COND_INPUT, &event); Sat, 29 Aug 2020 15:05:10 GMT http://community.qnx.com/sf/go/post120915 David Sheinberg 2020-08-29T15:05:10Z post120914: Re: select() vs ionotify() http://community.qnx.com/sf/go/post120914 Your call to MsgRegisterEvent() is incorrect. This is a tricky point when using pulse events, and you are not the first one to have got it wrong. When you initialize the pulse event you give it the connection ID on which to deliver the pulse, in your case 'coid'. However, the connection ID argument to MsgRegisterEvent() is used to identify the server that is permitted to deliver the event (to prevent malicious servers from delivering unauthorized events). You passed 'coid', but that one is not connected to the server. In your case you should pass 'fd'. --Elad Sat, 29 Aug 2020 13:36:20 GMT http://community.qnx.com/sf/go/post120914 Elad Lahav 2020-08-29T13:36:20Z post120913: Re: select() vs ionotify() http://community.qnx.com/sf/go/post120913 Yes, this is 7.1 and from the MsgRegisterEvent documentation I see that I must register the event for it to delivered by default. Thank you for pointing me in that direction! But event after I make the additional kernel call to register: chid = ChannelCreate(0); coid = ConnectAttach(0, getppid(), chid, _NTO_SIDE_CHANNEL, 0); SIGEV_PULSE_INIT( &event, coid, SIGEV_PULSE_PRIO_INHERIT, SI_NOTIFY, 0 ); SIGEV_MAKE_UPDATEABLE(&event); r = MsgRegisterEvent(&event, coid); if (r < 0) { perror("MsgRegisterEvent"); return 1; } my call: r = ionotify(fd, _NOTIFY_ACTION_POLLARM, _NOTIFY_COND_INPUT, &event); (which returns 0) followed by: rcvid = MsgReceivePulse( chid, &pulse, sizeof( pulse ), NULL ); doesn't receive the pulse? Does select() do something else to enable the ionotify() to work that I'm missing? Sat, 29 Aug 2020 12:45:14 GMT http://community.qnx.com/sf/go/post120913 David Sheinberg 2020-08-29T12:45:14Z post120912: Re: select() vs ionotify() http://community.qnx.com/sf/go/post120912 Which version of QNX? If you are using the newly-released 7.1 then you have to register the event (see MsgRegisterEvent()). --Elad Sat, 29 Aug 2020 10:54:14 GMT http://community.qnx.com/sf/go/post120912 Elad Lahav 2020-08-29T10:54:14Z post120911: Re: select() vs ionotify() http://community.qnx.com/sf/go/post120911 I wondered about that. In my case it returns 0. As I’ve written the resource manager, too, the trouble could be there.. But what I can’t quite understand is why select() works as I’d expect but ionotify() does not. Sat, 29 Aug 2020 05:14:37 GMT http://community.qnx.com/sf/go/post120911 David Sheinberg 2020-08-29T05:14:37Z post120910: Re: select() vs ionotify() http://community.qnx.com/sf/go/post120910 Check the return value of notify. If the condition is true, it doesn't arm the event, it instead returns the bits that were true. David From: community-noreply@qnx.com Sent: August 28, 2020 11:33 PM To: ostech-core_os@community.qnx.com Reply-to: ostech-core_os@community.qnx.com Subject: select() vs ionotify() I've got one resource manager that gathers data and supports ionotify so clients can wait on data to arrive and then grab it. I'd like to have another resource manager consume these data and process them further. For this it seems that I should use ionotify() over select(), as ionotify can deliver pulses to my second resource manager. This all makes sense, but while the following example using select() works, the ionotify() version doesn't receive messages. I'm sure I'm doing something silly, but if someone could point me in the right direction for using ionotify(), I'd greatly appreciate it! /////// select version: works #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <fcntl.h> #include <sys/select.h> int main( void ) { int fd; char buf[128]; fd_set rfd; fd = open("/dev/pioint", O_RDONLY); if (fd < 0) { perror("open"); return 1; } /* * Clear the set of read file descriptors, and * add the two we just got from the open calls. */ FD_ZERO( &rfd ); FD_SET( fd, &rfd ); for (;;) { select( 1+fd, &rfd, 0, 0, NULL); if( FD_ISSET( fd, &rfd ) ) { read(fd, buf, sizeof(buf)); printf(buf); } } return 0; } /////// ionotify version: doesn't receive any even message #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/iomsg.h> #include <sys/neutrino.h> int main() { int chid, coid; struct sigevent event; char buf[128]; char msg[32]; int r, rcvid; int fd = open("/dev/pioint", O_RDONLY); if (fd < 0) { perror("open"); return 1; } chid = ChannelCreate(0); coid = ConnectAttach(0, 0, chid, _NTO_SIDE_CHANNEL, 0); SIGEV_PULSE_INIT(&event, coid, 0, SI_NOTIFY, 0); for (;;) { r = ionotify(fd, _NOTIFY_ACTION_POLLARM, _NOTIFY_COND_INPUT, &event); rcvid = MsgReceive(chid, &msg, sizeof(msg), NULL); if (!rcvid) { read(r, &buf, 128); printf(buf); } } return 0; } _______________________________________________ OSTech http://community.qnx.com/sf/go/post120909 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Sat, 29 Aug 2020 05:04:44 GMT http://community.qnx.com/sf/go/post120910 David Sarrazin 2020-08-29T05:04:44Z post120909: select() vs ionotify() http://community.qnx.com/sf/go/post120909 I've got one resource manager that gathers data and supports ionotify so clients can wait on data to arrive and then grab it. I'd like to have another resource manager consume these data and process them further. For this it seems that I should use ionotify() over select(), as ionotify can deliver pulses to my second resource manager. This all makes sense, but while the following example using select() works, the ionotify() version doesn't receive messages. I'm sure I'm doing something silly, but if someone could point me in the right direction for using ionotify(), I'd greatly appreciate it! /////// select version: works #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <fcntl.h> #include <sys/select.h> int main( void ) { int fd; char buf[128]; fd_set rfd; fd = open("/dev/pioint", O_RDONLY); if (fd < 0) { perror("open"); return 1; } /* * Clear the set of read file descriptors, and * add the two we just got from the open calls. */ FD_ZERO( &rfd ); FD_SET( fd, &rfd ); for (;;) { select( 1+fd, &rfd, 0, 0, NULL); if( FD_ISSET( fd, &rfd ) ) { read(fd, buf, sizeof(buf)); printf(buf); } } return 0; } /////// ionotify version: doesn't receive any even message #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/iomsg.h> #include <sys/neutrino.h> int main() { int chid, coid; struct sigevent event; char buf[128]; char msg[32]; int r, rcvid; int fd = open("/dev/pioint", O_RDONLY); if (fd < 0) { perror("open"); return 1; } chid = ChannelCreate(0); coid = ConnectAttach(0, 0, chid, _NTO_SIDE_CHANNEL, 0); SIGEV_PULSE_INIT(&event, coid, 0, SI_NOTIFY, 0); for (;;) { r = ionotify(fd, _NOTIFY_ACTION_POLLARM, _NOTIFY_COND_INPUT, &event); rcvid = MsgReceive(chid, &msg, sizeof(msg), NULL); if (!rcvid) { read(r, &buf, 128); printf(buf); } } return 0; } Sat, 29 Aug 2020 03:33:55 GMT http://community.qnx.com/sf/go/post120909 David Sheinberg 2020-08-29T03:33:55Z post120896: 7.1 on ti-am335x-beaglebone http://community.qnx.com/sf/go/post120896 Not sure how much interest there is in this (I'm sure folks would prefer to see a fully support Raspberry Pi 4 BSP!) but I did manage to get the Beaglebone (Black) running 7.1. I can't attest to whether my changes to the audio driver actually work (not using it), but they do compile. Only other change I needed to do was to include the smmu lib to one of the startup module Makefiles. But seems to work fine. Fri, 14 Aug 2020 20:12:44 GMT http://community.qnx.com/sf/go/post120896 David Sheinberg 2020-08-14T20:12:44Z post120868: Re: Is this a an valid configuration file http://community.qnx.com/sf/go/post120868 Michael Kisel wrote: > I had already replied to previous posts that we do not explicitly exclude any version of PCI device. > The problem description you provide does not give any real insight into what specific problem it is you are having. > Perhaps collect some pci-tool output, The output of pci-tool isn't correct. It doesn't show the real assigned IRQ and its pin!! Please see my last posting! Also: the assignment of IRQs by the pci-server is weak documented ... however its seems not yet implemented! That means at the end -> the support of local bus PCI devices is currently not existent! Armin > PS: slog2info etc and we may be able to assist you really ? > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post120835 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Sun, 26 Jul 2020 09:07:43 GMT http://community.qnx.com/sf/go/post120868 Armin Steinhoff(deleted) 2020-07-26T09:07:43Z post120867: Member names http://community.qnx.com/sf/go/post120867 Not strictly an OS question but why do some of us have "(deleted)" after our names? Sat, 25 Jul 2020 01:42:21 GMT http://community.qnx.com/sf/go/post120867 Geoff Roberts(deleted) 2020-07-25T01:42:21Z post120866: Re: Wrong output by pci-tool/QNX7 and other failures! http://community.qnx.com/sf/go/post120866 I am having the same problem as Armin. pci-tool -vvv correctly identifies a Comtrol RocketPort VID/DID and its addresses but not the IRQ. It says 0 assigned (I think it shoudl be IRQ11). This is with 7.04 on a 64-bit x86 machine. It would be really good to get this sorted out. Geoff. Sat, 25 Jul 2020 01:39:12 GMT http://community.qnx.com/sf/go/post120866 Geoff Roberts(deleted) 2020-07-25T01:39:12Z post120865: Re: Wrong output by pci-tool/QNX7 and other failures! http://community.qnx.com/sf/go/post120865 pci-server has been restarted after setting the env var! Fri, 24 Jul 2020 18:43:33 GMT http://community.qnx.com/sf/go/post120865 Armin Steinhoff(deleted) 2020-07-24T18:43:33Z post120864: Re: Wrong output by pci-tool/QNX7 and other failures! http://community.qnx.com/sf/go/post120864 pci-server has been restarted set the env var !! Armin Fri, 24 Jul 2020 18:40:12 GMT http://community.qnx.com/sf/go/post120864 Armin Steinhoff(deleted) 2020-07-24T18:40:12Z post120863: Wrong output by pci-tool/QNX7 and other failures! http://community.qnx.com/sf/go/post120863 Hallo, the pci-tool of QNX7.0 shows false interrupt data for PCI 2.x devices! Output PCI-TOOL: B003:D00:F00 @ idx 15 vid/did: 10ec/8139 Realtek Semiconductor Corp., RTL8139 Realtek RTL8139 Family PCI Fast Ethernet NIC class/subclass/reg: 02/00/00 Ethernet Network Controller revid: 16 cmd/status registers: 7/280 Capabilities: * Address Space list - 2 assigned [0] I/O, addr=a000, size=100, align: 100, attr: 32bit ENABLED [1] MEM, addr=d1100000, size=100, align: 100, attr: 32bit ENABLED Interrupt list - 0 ==== it's simply wrong!! There is IRQ 5 assigned hdrType: 0 ssvid: 10ec Realtek Semiconductor Corp. ssid: 8139 LSPCI output: 03:00.0 Class 0200: Device 10ec:8139 (rev 10) Subsystem: Device 10ec:8139 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 64 (8000ns min, 16000ns max) Interrupt: pin A routed to IRQ 5 ======>>>>> that's correct!!!! Region 0: I/O ports at a000 Region 1: Memory at d1100000 (32-bit, non-prefetchable) Setting the env variable PCI_HW_CONFIG_FILE pointig to a valid hw config file doesn't assign the wanted IRQ, it does simply NOTHING!! Would it be possible solve these BUGS?? Armin Fri, 24 Jul 2020 18:35:04 GMT http://community.qnx.com/sf/go/post120863 Armin Steinhoff(deleted) 2020-07-24T18:35:04Z post120853: Re: timer_settime/SIGEV_SIGNAL_PULSE and SchedSet http://community.qnx.com/sf/go/post120853 You are not the first person to be fooled by the name of this constant. I really don't like it either. It so happens that if you use this value in an explicit call to MsgSendPulse() you get what you expect, i.e., the server thread inherits the priority of the thread that sent the pulse. But that is only because the value of SIGEV_PULSE_PRIO_INHERIT is -1, which is the documented value of MsgSendPulse() for this behaviour. However, when using asynchronous events there is no notion of a sender, and so SIGEV_PULSE_PRIO_INHERIT uses the default process priority for the server. I think it could have used a better name, though. --Elad Mon, 20 Jul 2020 12:02:23 GMT http://community.qnx.com/sf/go/post120853 Elad Lahav 2020-07-20T12:02:23Z post120852: Re: timer_settime/SIGEV_SIGNAL_PULSE and SchedSet http://community.qnx.com/sf/go/post120852 My mistake. Upon a closer read of the docs I see: short sigev_priority The priority of the pulse, or SIGEV_PULSE_PRIO_INHERIT if you want the thread that receives the pulse to run at the initial priority of the process. I thought (incorrectly, it seems) that if I changed the priority of the thread before making that call, the new priority would be inherited. That seems to be wrong, because if I use the desired priority there (and call SchedSet for the thread with the same priority, the code seems to work as expected. I was thrown by the "INHERIT"... I really appreciate the help. I'm a long time QNX4.25 user finally moving code to Neutrino... And looking forward to replacing expensive and aging PCI/ISA machines... Sat, 18 Jul 2020 18:18:13 GMT http://community.qnx.com/sf/go/post120852 David Sheinberg 2020-07-18T18:18:13Z post120851: Re: timer_settime/SIGEV_SIGNAL_PULSE and SchedSet http://community.qnx.com/sf/go/post120851 Thanks Elad - that all makes sense. It does seem like a bad idea to use _NTO_CHF_FIXED_PRIORITY as opposed to letting the pulse priority dictate that. And I do see that threads, not processes, have priorities. What is still puzzling to me is if I elevate priority of the server using SchedSet (for the single thread), then create the pulse event using SIGEV_PULSE_INIT (&event, coid, SIGEV_PULSE_PRIO_INHERIT, 0, 0); I would expect my process to run at the elevated priority both with respect to the timer interval generating the pulses and the receipt and processing of the timer pulse. My relatively crude debugging (twiddling the digital bit) doesn't clearly show whether it's the timer interval or the actual response to the timer pulse that jitters, but it seems that something is still running at 10r if I don't choose the _NTO_CHF_FIXED_PRIORITY upon creating the channel? Sat, 18 Jul 2020 18:06:41 GMT http://community.qnx.com/sf/go/post120851 David Sheinberg 2020-07-18T18:06:41Z post120850: Re: timer_settime/SIGEV_SIGNAL_PULSE and SchedSet http://community.qnx.com/sf/go/post120850 Your solution may work if you only ever receive one type of pulse/message, but generally (as John mentioned) it is expected that a receiver thread runs at the priority of the client (for a message) or the pulse it received last. Also note that there is no such thing as process priority in QNX. Priorities are only associated with threads. The nice() function is an anachronism that really should never have been provided, and will probably be dropped soon. --Elad Sat, 18 Jul 2020 17:13:22 GMT http://community.qnx.com/sf/go/post120850 Elad Lahav 2020-07-18T17:13:22Z post120849: Re: timer_settime/SIGEV_SIGNAL_PULSE and SchedSet http://community.qnx.com/sf/go/post120849 Ok, following your suggestion, I did change the call to ChannelCreate(_NTO_CHF_FIXED_PRIORITY) and used SIGEV_PULSE_PRIO_INHERIT for the pulse. Now I see the process running at the higher priority as expected. Thanks! Sat, 18 Jul 2020 15:26:59 GMT http://community.qnx.com/sf/go/post120849 David Sheinberg 2020-07-18T15:26:59Z post120848: Re: timer_settime/SIGEV_SIGNAL_PULSE and SchedSet http://community.qnx.com/sf/go/post120848 Thanks very much for the reply. As a very concrete example, I took the time1.c example here, which works fine generally: http://www.qnx.com/developers/docs/qnxcar2/topic/com.qnx.doc.neutrino.getting_started/topic/examples_time1.c.html From that I tried to use SchedSet to change the priority of the main thread which I thought would be inherited by the pulse. It would be even easier if all I needed to do was change the priority of the pulse from the event structure. I actually tried that (I think?!) but it still seemed that the timer itself then didn't have the higher priority (even if the pulse did)? I was using the code to twiddle a GPIO bit and without upping the priority I could see other processes (telnet interactions or pidin) had big effects in the timing. It doesn't seem like the timer_settime starts a new thread (according to pidin, at least), but if I just comment out that line and also use SchedSet, the priority of the time1 process elevates as expected. Sat, 18 Jul 2020 15:09:31 GMT http://community.qnx.com/sf/go/post120848 David Sheinberg 2020-07-18T15:09:31Z post120847: Re: timer_settime/SIGEV_SIGNAL_PULSE and SchedSet http://community.qnx.com/sf/go/post120847 correct link for the first link. http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.lib_ref/topic/c/channelcreate.html#channelcreate__Fixed Sat, 18 Jul 2020 11:32:30 GMT http://community.qnx.com/sf/go/post120847 John Kearney 2020-07-18T11:32:30Z post120846: Re: timer_settime/SIGEV_SIGNAL_PULSE and SchedSet http://community.qnx.com/sf/go/post120846 Without a code example of what you are doing exactly it's hard to say for sure. Having said that MsgReceive normally inherits the message/pulse priority. This feature is called "priority inheritance". As such there normally isn't much point setting the priority of a thread that is using MsgReceive. If you don't want to have priority inheritance, you can disable it on the channel using _NTO_CHF_FIXED_PRIORITY. see http://docserver.ott.qnx.com/700website/com.qnx.doc.neutrino.lib_ref/topic/c/channelcreate.html#channelcreate__Fixed However the way this is normally handled is by setting the pulse priority in the event structure. see the example here http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.lib_ref/topic/t/timer_create.html specifically this line event.sigev_priority = prio; Sat, 18 Jul 2020 09:15:16 GMT http://community.qnx.com/sf/go/post120846 John Kearney 2020-07-18T09:15:16Z post120845: timer_settime/SIGEV_SIGNAL_PULSE and SchedSet http://community.qnx.com/sf/go/post120845 I'm trying to write a small driver that uses a periodic timer to initiate a DAC read from the SPI bus. It generally works fine, but I wanted to be able to change the priority of the process using SchedSet. I've found that if I try to wake up using the pulse variant of the timer event, I can't adjust the priority (the calls don't fail, but pidin indicates my process is still running 10r). I can run the program using nice, and it works as expected, allowing me to up the priority. But when I try to change internally using SchedSet, the priority doesn't seem to change. If, instead, I use the SIGNAL_THREAD event, then I can handle the signal using sigaction/sa_handler and my MsgReceive will wake up. In this mode, my SchedSet works and priorities can be changed. The latter version is actually fine, but I was curious what timer_settime does behind the scenes when sending pulses that prevents my call to SchedSet from working as I expect? Sat, 18 Jul 2020 03:59:25 GMT http://community.qnx.com/sf/go/post120845 David Sheinberg 2020-07-18T03:59:25Z post120843: Re: Trigger processes on QNX startup http://community.qnx.com/sf/go/post120843 Adding the script just adds a file to the image. if you want it to be executed you have to add it to the .script block. e.g. [+script] .script = { # Initialise the console procmgr_symlink ../../proc/boot/ldqnx-64.so.2 /usr/lib/ldqnx-64.so.2 devc-sermx1 -e -F -S -c80000000 0x021E8000,59 waitfor /dev/ser1 4 reopen display_msg Welcome to QNX Neutrino 7.1 on the Elsinor Hamlet 2B ON2B (ARM Cortex-A9 MP Core) /script/my_script.sh & # <<<< execute my script. [+session] ksh /proc/boot/.console.sh & } [perms=0555] /script/my_script.sh={ #!/bin/sh echo Hello World. } Thu, 16 Jul 2020 16:37:38 GMT http://community.qnx.com/sf/go/post120843 John Kearney 2020-07-16T16:37:38Z post120842: Trigger processes on QNX startup http://community.qnx.com/sf/go/post120842 We are trying to find an approach for triggering processes on QNX startup. Basically, we have a couple of custom built binaries + the networking manager "bin/io-pkt-v6-hc" that we need to start after QNX has booted. (This network manager service isn't started after QNX has booted up in our image.) Documentation is describing startup scripts, but just adding these to a buildfile doesn't seem to do work. http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.building/topic/buildfiles/buildfile_structure.html Any idea what could be missing here? Thu, 16 Jul 2020 15:47:28 GMT http://community.qnx.com/sf/go/post120842 Viktor Rusnak 2020-07-16T15:47:28Z post120841: Re: How Screen calls the WFD driver http://community.qnx.com/sf/go/post120841 I see no update in this. Can any one help on this On one of the document i see Windows calling compositor and it calls the screen Thu, 16 Jul 2020 07:40:05 GMT http://community.qnx.com/sf/go/post120841 Sobin Thomas 2020-07-16T07:40:05Z post120837: How Screen calls the WFD driver http://community.qnx.com/sf/go/post120837 Hi I want to know how the screen context calls the WFD Code. For eg, if we write the sw-vsync application how the application will call the WFD calls. I am not able to track how the call is being made How the slay screen will call the application to exit. Can you give me some more info on this Is there any event that cause application to exit when the slay screen is called. Sun, 12 Jul 2020 05:36:46 GMT http://community.qnx.com/sf/go/post120837 Sobin Thomas 2020-07-12T05:36:46Z post120836: Re: Is this a an valid configuration file http://community.qnx.com/sf/go/post120836 > I had already replied to previous posts that we do not explicitly exclude any > version of PCI device. Sorry, it isn't true for versions of QNX 6.x. The support of devices based on the parallel PCI bus is a littlebit lousy under QNX 7.x > The problem description you provide does not give any real insight into what > specific problem it is you are having. The fact that we have to create speciallized OS images for parallel bus PCI devices could be better.documented!! > Perhaps collect some pci-tool output, slog2info etc and we may be able to > assist you My question was:"A fter creating an adapted OS Image - for manually assigning an IRQ - are parallel bus PCI devices fully supported??". BTW ... long time ago, I provided a screendump of pci-tool showing that no IRQ has been assigned!! I haven't seen hints about PCI config files a.s.o. Regards Armin Sat, 11 Jul 2020 09:14:16 GMT http://community.qnx.com/sf/go/post120836 Armin Steinhoff(deleted) 2020-07-11T09:14:16Z post120835: Re: Is this a an valid configuration file http://community.qnx.com/sf/go/post120835 I had already replied to previous posts that we do not explicitly exclude any version of PCI device. The problem description you provide does not give any real insight into what specific problem it is you are having. Perhaps collect some pci-tool output, slog2info etc and we may be able to assist you Thu, 09 Jul 2020 17:58:07 GMT http://community.qnx.com/sf/go/post120835 Michael Kisel 2020-07-09T17:58:07Z post120834: Re: Is this a an valid configuration file http://community.qnx.com/sf/go/post120834 Some PCI Local Bus Specification Revision 2.1 based audio interfaces are supported by QNX 7.0! That means it should be possible to support other PCI Local Bus Specification Revision 2.1 based PCI boards. The PCI server is able to assign memory to the PCI config space, a PCI config file allows to generate an OS image with an Interrupt assigned to an individual PCI 2.1 device. What's the problem? Is the PCI lib of QNX7 ignoring PCI 2.1 based devices? Thu, 09 Jul 2020 17:48:26 GMT http://community.qnx.com/sf/go/post120834 Armin Steinhoff(deleted) 2020-07-09T17:48:26Z post120827: Re: Is this a an valid configuration file http://community.qnx.com/sf/go/post120827 Armin, as an aside, I believe you had commented in this forum previously about having problems with IRQ assignments for legacy devices (in which MSI/MSI-X was not supported). Without having the details, I believe this is probably related to missing chipset support in the SDP7 released version of the Intel HW module which was version 2.0. This module is now at revision 2.4 and among other changes, includes support for many (but perhaps still not all) of the newer chipsets. You should be able to obtain access to this HW module by contacting your sales rep or FAE Wed, 08 Jul 2020 15:57:50 GMT http://community.qnx.com/sf/go/post120827 Michael Kisel 2020-07-08T15:57:50Z post120826: Re: Is this a an valid configuration file http://community.qnx.com/sf/go/post120826 all parameters within a config file are optional as is the use of a config file itself. You need only add entries for the parameters you wish to control/alter Wed, 08 Jul 2020 15:47:11 GMT http://community.qnx.com/sf/go/post120826 Michael Kisel 2020-07-08T15:47:11Z post120825: Re: Is this a an valid configuration file http://community.qnx.com/sf/go/post120825 Do we have to fill out all sections? Or is it optional? We have just to assigne the Interrupt for a decent PCI board ... Wed, 08 Jul 2020 15:25:20 GMT http://community.qnx.com/sf/go/post120825 Armin Steinhoff(deleted) 2020-07-08T15:25:20Z post120823: Re: Is this a an valid configuration file http://community.qnx.com/sf/go/post120823 template files exist to document the usage and use examples to do that. They are not expected to be used as is. What entry in particular is causing confusion? Wed, 08 Jul 2020 12:38:07 GMT http://community.qnx.com/sf/go/post120823 Michael Kisel 2020-07-08T12:38:07Z post120821: Is this a an valid configuration file http://community.qnx.com/sf/go/post120821 or just an incomplete example of pci_hw-template.cfg? # Example entry # ------------- # For the second device with VID/DID 0x1234/0xabcd, use 16MB for BAR 1, 256MB # for BAR 3 and 1 MB for BAR 5 (none of these could be 64 bit BAR's) # # 1234;abcd;1;1:8;3:12;5:4 # # ############################# S E C T I O N ################################## # [interrupts] # # PCI Interrupt Pin Assignments and IRQ mappings # ---------------------------------------------- # ############################# S E C T I O N ################################## # [slots] # # Chassis and Slot Mappings # ------------------------- # ############################# S E C T I O N ################################## # [aspace] # # Address Space # ------------- # # ASPACE_FILTER= # ############################# S E C T I O N ################################## # [rbar] # # Resizable BAR Overrides # ----------------------- # Wed, 08 Jul 2020 09:03:11 GMT http://community.qnx.com/sf/go/post120821 Armin Steinhoff(deleted) 2020-07-08T09:03:11Z post120816: QNX 6.5 SP1 chipset compatibiity http://community.qnx.com/sf/go/post120816 Hi, I should install version 6.5 SP1 on a PC that mounts an Intel 6th Gen and a Q170/H110 chipset, DDR4 ram. The network adapter is an Intel I210IT. where can I find the list of compatible chipsets and LAN? thks Fabio Tue, 07 Jul 2020 13:52:18 GMT http://community.qnx.com/sf/go/post120816 Fabio Rossi 2020-07-07T13:52:18Z post120805: Audio card driver / PCI cards http://community.qnx.com/sf/go/post120805 Are all library calls of the PCI lib applicable?? Wed, 24 Jun 2020 22:25:50 GMT http://community.qnx.com/sf/go/post120805 Armin Steinhoff(deleted) 2020-06-24T22:25:50Z post120789: drm-intel crash in Neutrino 7.0 http://community.qnx.com/sf/go/post120789 I'm trying to run screen in in QNX Neutrino 7.0. I have the desired qnx neutrino image running in qemu with a GPU (Intel 620 UHD) passthrough for development purposes. Before trying to launch screen, that is also crashing, I'm trying to run drm-intel and drm-probe-displays. There is no problem with the first one (drm-intel). However, drm-intel completely crash after running drm-probe-display. By examinatin the logs, seems as if the GPU is not supported. See qemu_drm-intel_crash.png for the logs. When checking pci-tool I'm able to see two GPUs or at least two display controllers. See qemu_graphic_controllers.png for the output of pci-tool regarding those devices. I was expecting the Intel board to be in charge of main display. However seems that drm-intel is crashing because the device managing display is not supported by drm-intel. Any idea about how can I solve this issue? Thanks Thu, 18 Jun 2020 06:29:25 GMT http://community.qnx.com/sf/go/post120789 Albert Puente Encinas(deleted) 2020-06-18T06:29:25Z post120684: Re: queries related to QNX Neutrino RTOS functionality & coding standard http://community.qnx.com/sf/go/post120684 QNX has its own coding standard, which aligns with MISRA in many respects but is not itself MISRA 2012. --Elad Mon, 25 May 2020 10:45:00 GMT http://community.qnx.com/sf/go/post120684 Elad Lahav 2020-05-25T10:45:00Z post120683: Re: Question about synchronization of real-time threads by signals. http://community.qnx.com/sf/go/post120683 I tried your code, and sigwait() is definitely returning as a result of the signals generated by the timer. I don't know what you expect to happen, though, as the threads will be stuck in an infinite loop no matter what: ==================================== loop: if(sigwait(&set, &sigw)) // if ((SignalWaitinfo(&set,0))==-1) { goto loop; } // printf("\nAfter In Loop 50\n"); VCount50++; goto loop; ===================================== So every time a signal is generated (and you have a periodic timer for each thread) the code ends up jumping back to the loop label. --Elad Mon, 25 May 2020 10:41:06 GMT http://community.qnx.com/sf/go/post120683 Elad Lahav 2020-05-25T10:41:06Z post120682: Re: Question about synchronization of real-time threads by signals. http://community.qnx.com/sf/go/post120682 If you run under the debugger, then it catches all signals by default. Try to run your program szand-alone on the target. Does it work then? Regards, Albrecht Mon, 25 May 2020 10:06:54 GMT http://community.qnx.com/sf/go/post120682 Albrecht Uhlmann 2020-05-25T10:06:54Z post120681: Re: queries related to QNX Neutrino RTOS functionality & coding standard http://community.qnx.com/sf/go/post120681 I am asking that whether QNX develops its own code according to the MISRA standard Mon, 25 May 2020 09:43:27 GMT http://community.qnx.com/sf/go/post120681 Sanjay Gupta 2020-05-25T09:43:27Z post120680: Question about synchronization of real-time threads by signals. http://community.qnx.com/sf/go/post120680  • Hello. Question about synchronization of real-time threads by signals. Test task: - create 2 real-time streams. - the interval for starting the thread is provided by an interval timer. - each thread has its own timer, time interval, priority, and real-time signal (from SIGRTMIN ...SIGRTMAX range). When the time interval expires, the timer generates an event with its own number. The thrrad is waiting for a signal from the timer ( sigwait (&set, &sigw);). When the timer signal arrives, the thread must perform certain operations (I have an increased counter). If you use special sigrtmax + 7 or SIGRTMAX + 8 signals in the task, the task is completed. If you use real-time signals SIGRTMIN+1, SIGRTMIN+2, the task is not performed. the Threads go to SUSPEND mode and work only when you click the RESUME button. (see the screenshot ) In this process, real-time signals are converted into special signals according to the documentation. (Real-time operating system QNX Neutrino 6.5. System architecture. Inter-task interaction in QNX Neutrino OS. Events.) Text from the program: struct sigaction action; sigemptyset(&set); sigaddset(&set,SIGNALTIMER100); sigaddset(&set,SIGNALTIMER50); act.__sa_un._sa_handler= SIG_DFL; act.sa_flags =SA_SIGINFO; sigaction(SIGNALTIMER100, &act, NULL); sigaction(SIGNALTIMER50, &act, NULL); sigprocmask(SIG_BLOCK, &set, NULL);// Tell me where the error is ? Can you give a link to an example of implementing such threads? Why signals don't become "special". I attach the program text. Mon, 25 May 2020 09:21:10 GMT http://community.qnx.com/sf/go/post120680 FAZLOV VICTOR 2020-05-25T09:21:10Z post120678: Re: qnxsoftwarecenter crashes on Ubuntu 19.10 http://community.qnx.com/sf/go/post120678 Thank you. Indeed I had better luck with the command line tool. Fri, 22 May 2020 18:47:54 GMT http://community.qnx.com/sf/go/post120678 Mauro Persano 2020-05-22T18:47:54Z post120673: Re: qnxsoftwarecenter crashes on Ubuntu 19.10 http://community.qnx.com/sf/go/post120673 Yes, this is a very painful tool. Sometimes you can reduce the chance of crashing, if you use the commandline version "qnxsoftwarecenter_clt". -Michael > Apologies in advance if this is not the right place to post this. > > I wanted to try the 30 day evaluation for QNX SDP 7.0 but unfortunately > couldn't get very far, qnxsoftwarecenter crashes on Ubuntu 19.10. Error report > file is attached. Fri, 22 May 2020 08:16:43 GMT http://community.qnx.com/sf/go/post120673 Michael Tasche 2020-05-22T08:16:43Z post120656: Re: queries related to QNX Neutrino RTOS functionality & coding standard http://community.qnx.com/sf/go/post120656 I am asking that whether QNX develops its own code according to the MISRA standard Wed, 20 May 2020 12:45:20 GMT http://community.qnx.com/sf/go/post120656 Sanjay Gupta 2020-05-20T12:45:20Z post120655: Re: queries related to QNX Neutrino RTOS functionality & coding standard http://community.qnx.com/sf/go/post120655 It is not clear what you are asking. MISRA is a coding standard. Are you asking whether QNX develops its own code according to the standard, or whether you can develop code for a QNX system using this standard? --Elad Wed, 20 May 2020 11:52:05 GMT http://community.qnx.com/sf/go/post120655 Elad Lahav 2020-05-20T11:52:05Z post120654: Re: queries related to QNX Neutrino RTOS functionality & coding standard http://community.qnx.com/sf/go/post120654 May I know the name of person who can answer my second query Wed, 20 May 2020 06:36:12 GMT http://community.qnx.com/sf/go/post120654 Sanjay Gupta 2020-05-20T06:36:12Z post120652: Re: queries related to QNX Neutrino RTOS functionality & coding standard http://community.qnx.com/sf/go/post120652 Hi Sanjay, 1. Yes, QNX supports full POSIX process model, so this can be accomplished very easily. 2. Whether the Microkernel/Process Manager (procnto - the actual core of the QNX OS) and the C lib are MISRA compliant is a question that the QNX guys would need to answer. But if you have the requirement of creating an application that is MISRA compliant you will have good chances to achieve that because procnto/libc are pre-certified to a number of standards related to safety/security, and your application will be contained in a dedicated process that is completely isolated from the rest of the system. -Al Tue, 19 May 2020 13:18:05 GMT http://community.qnx.com/sf/go/post120652 Albrecht Uhlmann 2020-05-19T13:18:05Z post120651: queries related to QNX Neutrino RTOS functionality & coding standard http://community.qnx.com/sf/go/post120651 I have some queries related to QNX Neutrino RTOS 1. Whether it provides multi-application support just like Android OS in which new application can be installed in future without interfering existing application running on OS. 2. Is this OS MISRA 2012 complaint. Tue, 19 May 2020 12:53:44 GMT http://community.qnx.com/sf/go/post120651 Sanjay Gupta 2020-05-19T12:53:44Z post120637: qnxsoftwarecenter crashes on Ubuntu 19.10 http://community.qnx.com/sf/go/post120637 Apologies in advance if this is not the right place to post this. I wanted to try the 30 day evaluation for QNX SDP 7.0 but unfortunately couldn't get very far, qnxsoftwarecenter crashes on Ubuntu 19.10. Error report file is attached. Fri, 15 May 2020 21:20:45 GMT http://community.qnx.com/sf/go/post120637 Mauro Persano 2020-05-15T21:20:45Z post120540: Re: Options for a web server running on QNX 6.5 SP1 http://community.qnx.com/sf/go/post120540 It is worth noting that we are supporting legacy code that uses CGI files with the web server. So we are looking for an option that runs in QNX 6.5 SP1, supports CGI files, and TLS 1.1 and 1.2. Wed, 29 Apr 2020 14:30:31 GMT http://community.qnx.com/sf/go/post120540 Deepain Nayyar(deleted) 2020-04-29T14:30:31Z post120526: Options for a web server running on QNX 6.5 SP1 http://community.qnx.com/sf/go/post120526 What are the available options for a web server running on QNX 6.5 SP1 that will support TLS 1.1 and TLS 1.2? We are currently using the binary of bozohttpd compiled 20109020 but it only supports TLS 1.0? Tue, 28 Apr 2020 15:12:05 GMT http://community.qnx.com/sf/go/post120526 Deepain Nayyar(deleted) 2020-04-28T15:12:05Z post120414: Re: bind() with abtract unix socket http://community.qnx.com/sf/go/post120414 I was working on some other part of io-pkt, and did a quick check on it. It seems like a bug. For abstract socket, it goes straight to node creation without having existence check. So you'd end up with having the same abstract name being registered multiple times. When this happens, the new one will overlay the others. I don't know if there's reasons for that, I'd double check with io-pkt team. Fri, 27 Mar 2020 17:38:55 GMT http://community.qnx.com/sf/go/post120414 Ronald Yu 2020-03-27T17:38:55Z post120402: Re: bind() with abtract unix socket http://community.qnx.com/sf/go/post120402 Hi Will, I think you've mistaken, as it reads in the QNX manual: http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.lib_ref/topic/u/unix_proto.html it support abstract sockets. But yes, there are many alternatives for detecting a running damon, so the original problem is not really bothering anymore. I'd still like to have clarity, is this a bug or feature? BR, Lauri Thu, 26 Mar 2020 09:09:58 GMT http://community.qnx.com/sf/go/post120402 Lauri Kaila 2020-03-26T09:09:58Z post120400: Re: bind() with abtract unix socket http://community.qnx.com/sf/go/post120400 Hi Lauri, The "abstract socket namespace" is a non-portable Linux extension. It's not supported on any other operating system, including QNX. You'll need to find another approach to prevent multiple execution; I believe the common standard is to use a lockfile of some form. Ref: http://man7.org/linux/man-pages/man7/unix.7.html Hope this helps some, -Will Wed, 25 Mar 2020 13:40:14 GMT http://community.qnx.com/sf/go/post120400 Will Miles 2020-03-25T13:40:14Z post120396: bind() with abtract unix socket http://community.qnx.com/sf/go/post120396 Hi, Is it a known "feature" that using abstract unix domain sockets (zero byte at the start of pathname) bind() doesn't return EADDRINUSE even when it should. Non-abstract path works fine. We ran into a code that was ported from Linux, which was relying on this to detect "server already running" situation. BR, Lauri Wed, 25 Mar 2020 06:43:19 GMT http://community.qnx.com/sf/go/post120396 Lauri Kaila 2020-03-25T06:43:19Z post120369: Re: How to get performance metrics from API http://community.qnx.com/sf/go/post120369 Hi, Elad, Thank you for replying. > The getrusage() function should give you the process run times. I'm not sure > why it was never extended to provide information beyond that. I would like to receive the usage time for my process's children, as well. getrusage() documentation says this: "Which process to get the usage for: RUSAGE_CHILDREN — get information about resources used by the terminated and waited-for children of the current process. If the child is never waited for (e.g., if the parent has SA_NOCLDWAIT set, or sets SIGCHLD to SIG_IGN), the resource information for the child process is discarded and isn't included. " It appears that all children are accumulated into one result - is that correct? There's no way for me to query the usage by PID for an individual child? > Memory usage is a much trickier subject, as no single number can encompass the > notion of "usage". If you look under /proc/<PID>/vmstat you will see different > numbers corresponding to the amount of virtual address space used, how much of > it is private as opposed to shared, how much private memory was reserved for > the process, etc. I'm not looking for a precise measurement but a coarse method to show the change in memory allocation over time. I'm trying to show trends (memory leakage) and perhaps spikes (large changes in allocation) in applications that are effectively daemons and are always running. In this scenario, I'm writing something akin to Unix 'init' and spawning child processes at startup that I then want to monitor. The getrusage has some conflicting info. It describes various members of the struct: "ru_idrss An “integral” value indicating the amount of memory in use by a process while the process is running. This value is the sum of the resident set sizes of the process running when a clock tick occurs. The value is given in pages times clock ticks. It doesn't take sharing into account. See the Caveats section, below." Then in the Caveats it says: "Only the timeval fields of struct rusage are supported." Caveats then goes on to describe the inner workings of some other fields... but I can't tell if they're actually supported or not. Is ru_idrss something I could use? Thanks again, ---Jason Thu, 12 Mar 2020 18:43:28 GMT http://community.qnx.com/sf/go/post120369 Jason Tiller(deleted) 2020-03-12T18:43:28Z post120366: Re: How to get performance metrics from API http://community.qnx.com/sf/go/post120366 Not the existing ones, unless you are willing to get all mappings and then accumulate the results. You can see what these do if you cat '/proc/<pid>/pmap' (per region) and '/proc/<pid>/mappings' (per page). --Elad ________________________________________ From: Albrecht Uhlmann <community-noreply@qnx.com> Sent: 12 March 2020 08:00:46 To: ostech-core_os Subject: Re: How to get performance metrics from API I am wondering that the procfs DCMD control codes could not be used to obtain that information? _______________________________________________ OSTech http://community.qnx.com/sf/go/post120365 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 12 Mar 2020 12:33:27 GMT http://community.qnx.com/sf/go/post120366 Elad Lahav 2020-03-12T12:33:27Z post120365: Re: How to get performance metrics from API http://community.qnx.com/sf/go/post120365 I am wondering that the procfs DCMD control codes could not be used to obtain that information? Thu, 12 Mar 2020 12:00:46 GMT http://community.qnx.com/sf/go/post120365 Albrecht Uhlmann 2020-03-12T12:00:46Z post120364: Re: How to get performance metrics from API http://community.qnx.com/sf/go/post120364 The getrusage() function should give you the process run times. I'm not sure why it was never extended to provide information beyond that. Memory usage is a much trickier subject, as no single number can encompass the notion of "usage". If you look under /proc/<PID>/vmstat you will see different numbers corresponding to the amount of virtual address space used, how much of it is private as opposed to shared, how much private memory was reserved for the process, etc. I did add an API to get this information programmatically a couple of years ago, but it looks like it hasn't been part of any release yet. --Elad ________________________________________ From: Jason Tiller(deleted) <community-noreply@qnx.com> Sent: 11 March 2020 21:55:33 To: ostech-core_os Subject: How to get performance metrics from API I would like to monitor my process's memory utilization and CPU utilization from the C API. There's an extremely limited implementation of POSIX getrusage(), but I was unable to find another obvious API for doing this. I'll use /proc/ in Linux, but QNX's /proc is very sparse compared to Linux's and doesn't have the information I need. How would I go about doing this? Thanks! _______________________________________________ OSTech http://community.qnx.com/sf/go/post120363 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 12 Mar 2020 11:15:38 GMT http://community.qnx.com/sf/go/post120364 Elad Lahav 2020-03-12T11:15:38Z post120363: How to get performance metrics from API http://community.qnx.com/sf/go/post120363 I would like to monitor my process's memory utilization and CPU utilization from the C API. There's an extremely limited implementation of POSIX getrusage(), but I was unable to find another obvious API for doing this. I'll use /proc/ in Linux, but QNX's /proc is very sparse compared to Linux's and doesn't have the information I need. How would I go about doing this? Thanks! Thu, 12 Mar 2020 01:55:33 GMT http://community.qnx.com/sf/go/post120363 Jason Tiller(deleted) 2020-03-12T01:55:33Z post120236: Re: OS restart http://community.qnx.com/sf/go/post120236 You should check the priorities of the watchdog kick thread and compare it to the priorities of your applications and also other threads in the system (for instance, some threads inside io-pkt or devb-* drivers have fixed priorities of 21 to serve the media). Maybe the watchdog kick thread is simply starved of CPU time. -Al Thu, 06 Feb 2020 07:54:30 GMT http://community.qnx.com/sf/go/post120236 Albrecht Uhlmann 2020-02-06T07:54:30Z post120234: Re: OS restart http://community.qnx.com/sf/go/post120234 At first thank for your kindly reply. Then i must correct the previous reply which i said kick watchdog every 2.5 seconds.I make mistake i kick wtchdoh every 100 ms in my kick watchdog app.Also in first app i use watchdog to reset every 2.5 seconds.Already i disabled watchdog in my app and test it again . Till now OS do not reset Regards Wed, 05 Feb 2020 17:17:00 GMT http://community.qnx.com/sf/go/post120234 Amin Sahebi 2020-02-05T17:17:00Z post120233: Re: OS restart http://community.qnx.com/sf/go/post120233 I suggest to You to disable the watch-dog as first thing and to check if someone of Your threads may block the refresh of wdt in some critical moment. btw, What is the expiring period of watch dog? Bye Wed, 05 Feb 2020 16:02:48 GMT http://community.qnx.com/sf/go/post120233 mario sangalli 2020-02-05T16:02:48Z post120232: Re: OS restart http://community.qnx.com/sf/go/post120232 Yes i have it but i have another watchdog kicker app which kick watchdog every 2.5 seconds. Wed, 05 Feb 2020 13:27:18 GMT http://community.qnx.com/sf/go/post120232 Amin Sahebi 2020-02-05T13:27:18Z post120231: Re: OS restart http://community.qnx.com/sf/go/post120231 maybe You have a watch dog that is not retriggered in time? OS should be restarted for a crash in interrupts or drivers... maybe You can log the terminal messages to catch the problem. bye Wed, 05 Feb 2020 13:19:23 GMT http://community.qnx.com/sf/go/post120231 mario sangalli 2020-02-05T13:19:23Z post120230: OS restart http://community.qnx.com/sf/go/post120230 Hello every body My processor is PPC440EP which has QNX 6.5 as Operating system on it. An application is run which I has developed by myself and after a while (about 10 hours), the OS is getting restarted. In my code in some places I called "shutdown" system call for a certain purpose and before I call that system call, I put down "printf" and "fflush (stdout);" in the code. I suppose that after the OS is getting restarted, I see the logs from "printf", but I do not. Is it possible that the OS is getting restarted from somewhere else?(such as socket programming section or corruption on network's driver or something like that? ) Is it possible the restarting situation is because of the SIGSEGV or SEGFAULT or any other signals like them? King regards. Wed, 05 Feb 2020 12:40:41 GMT http://community.qnx.com/sf/go/post120230 Amin Sahebi 2020-02-05T12:40:41Z post120225: Re: QNX 4.25 Starting QNX issues http://community.qnx.com/sf/go/post120225 By using the QNX 4 CD and mounting the drive I am able to make the boot image using atapi Tue, 04 Feb 2020 15:29:18 GMT http://community.qnx.com/sf/go/post120225 Don Cook 2020-02-04T15:29:18Z post120224: qnx 4.25 weird keyboard issues http://community.qnx.com/sf/go/post120224 At sometimes when I type ie: cat /etc/config/trap/input.$NODE i need to press the down arrow or enter key to insert each letter has anyone ever had this issue? Tue, 04 Feb 2020 15:03:58 GMT http://community.qnx.com/sf/go/post120224 Don Cook 2020-02-04T15:03:58Z post120223: Re: openmp poor performance http://community.qnx.com/sf/go/post120223 More details: test code: ``` #include <stdio.h> #include <omp.h> #include <vector> #include <chrono> #include <iostream> int main(int argc, char** argv) { int N = 100000; if (auto env = std::getenv("NUM_ITERS")) N = std::stoi(env); int jobs = 10000; if (auto env = std::getenv("NUM_JOBS")) jobs = std::stoi(env); int nthreads = 4; if (auto env = std::getenv("NUM_THREADS")) nthreads = std::stoi(env); std::vector<float> a(N), b(N), c(N); int i; for (i = 0; i < N; i++) { a[i] = i * 2.0; b[i] = i * 3.0; } auto startTime = std::chrono::high_resolution_clock::now(); for (int j = 0; j < jobs; ++j) { #pragma omp parallel for num_threads(nthreads) for (i = 0; i < N; i++) { c[i] = a[i] + b[i]; } } auto endTime = std::chrono::high_resolution_clock::now(); float totalTime = std::chrono::duration<float, std::milli>(endTime - startTime).count(); std::cout << "total time: " << totalTime <<"ms" << std::endl; } ``` result running on QNX: ``` # export NUM_THREADS=1 # ./openmp_test total time: 633ms # export NUM_THREADS=4 # ./openmp_test total time: 1497ms ``` result running on Ubuntu with same hardware: ``` nvidia@tegra-ubuntu:~$ export NUM_THREADS=1 nvidia@tegra-ubuntu:~$ ./openmp_test total time: 484.654ms nvidia@tegra-ubuntu:~$ export NUM_THREADS=4 nvidia@tegra-ubuntu:~$ ./openmp_test total time: 237.67ms ``` you can see on QNX, use more threads brings more latency, which doesn't make that sense Mon, 03 Feb 2020 18:14:42 GMT http://community.qnx.com/sf/go/post120223 Wenbin Wang 2020-02-03T18:14:42Z post120222: Re: PCI 2.x devices not supported by QNX 7.0 http://community.qnx.com/sf/go/post120222 First results are attached ... it's the 64bit version of lspci ... its code base could be the base for the PCI server. > Ok ... in order to support 32-bit PCI 2.x adapter for QNX 7.0 I'm going to > develop my own 64-bit PCI server. > It will be just a standard resource manager dealing only with 32-bit PCI card > bus adapter. > > Armin Steinhoff Mon, 03 Feb 2020 17:38:22 GMT http://community.qnx.com/sf/go/post120222 Armin Steinhoff(deleted) 2020-02-03T17:38:22Z post120211: Re: QNX 4.25 Starting QNX issues http://community.qnx.com/sf/go/post120211 Yeah I am aware of the age, however, this is something inherited ;\ Fri, 31 Jan 2020 16:06:12 GMT http://community.qnx.com/sf/go/post120211 Don Cook 2020-01-31T16:06:12Z post120210: Re: QNX 4.25 Starting QNX issues http://community.qnx.com/sf/go/post120210 You do realize that you are referring to a 25 year old version of the OS... --Elad ________________________________________ From: Don Cook <community-noreply@qnx.com> Sent: 31 January 2020 10:39:00 To: ostech-core_os Subject: Re: QNX 4.25 Starting QNX issues What do you mean in regards to the USB key? Does QNX really only like pure PATA connections? > Hi, > > it seems to be a SATA vs QNX. > I've seen installer working with the disk (ATA mode) but the boot image does > not. > > Try the USB key... the modern BIOS should also have simulation options. > > Good luck, > -- Alexandre _______________________________________________ OSTech http://community.qnx.com/sf/go/post120209 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 31 Jan 2020 15:51:08 GMT http://community.qnx.com/sf/go/post120210 Elad Lahav 2020-01-31T15:51:08Z post120209: Re: QNX 4.25 Starting QNX issues http://community.qnx.com/sf/go/post120209 What do you mean in regards to the USB key? Does QNX really only like pure PATA connections? > Hi, > > it seems to be a SATA vs QNX. > I've seen installer working with the disk (ATA mode) but the boot image does > not. > > Try the USB key... the modern BIOS should also have simulation options. > > Good luck, > -- Alexandre Fri, 31 Jan 2020 15:39:00 GMT http://community.qnx.com/sf/go/post120209 Don Cook 2020-01-31T15:39:00Z post120208: Re: QNX 4.25 Starting QNX issues http://community.qnx.com/sf/go/post120208 Hi, it seems to be a SATA vs QNX. I've seen installer working with the disk (ATA mode) but the boot image does not. Try the USB key... the modern BIOS should also have simulation options. Good luck, -- Alexandre Fri, 31 Jan 2020 15:33:08 GMT http://community.qnx.com/sf/go/post120208 Alexandre REBEKO(deleted) 2020-01-31T15:33:08Z post120205: Re: QNX 4.25 Starting QNX issues http://community.qnx.com/sf/go/post120205 QNX Loader Boot Partition 4 Press Esc for alternate OS.......... 65391MHZ 686/687 PCI bus boot modules: /boot/sys/Proc32 /boot/sys/Slib32 /boot/sys/Slib16 /bin/Fsys /bin/Fsys.eide /bin/mount /bin/sinit starting QNX... No Adaptors found! nothing else progresses the screen anyone else have any experience with this type of error? I've exhausted my google fu skills and found this place as my Obi Wan Kenobi. Fri, 31 Jan 2020 15:25:11 GMT http://community.qnx.com/sf/go/post120205 Don Cook 2020-01-31T15:25:11Z post120202: QNX 4.25 Starting QNX issues http://community.qnx.com/sf/go/post120202 I have an older QNX 4.25 system and when trying to boot or load the .altboot, I get a Starting QNX..... No Adaptors Found!! and it proceeds to tell me via mount that the /dev/hd0.0 file not found my QNX4CD install CD tells me it detects the drive, and when I do upgrade I actually see hd0.0 and hd0.t.077(i think) This is an SATA drive with BIOS option to use ATA not AHCI or RAID, I am at a loss I inherited the problem with no floppy. Wed, 29 Jan 2020 18:26:58 GMT http://community.qnx.com/sf/go/post120202 Don Cook 2020-01-29T18:26:58Z post120187: Re: stat() timestamps for directories http://community.qnx.com/sf/go/post120187 Hi Michael, Thanks for the link! Looks like it's a possible solution. However, I've tried simply glob("/dev/shmem/*") periodically and so far it looks like good enough solution. Feels a little wasteful though. Lauri Tue, 28 Jan 2020 08:09:01 GMT http://community.qnx.com/sf/go/post120187 Lauri Kaila 2020-01-28T08:09:01Z post120185: Re: Moving resource manager to IFS (primary image) http://community.qnx.com/sf/go/post120185 The documentation that discusses how to add files to an IFS is here: http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.building/topic/buildfiles/buildfile.html Mon, 27 Jan 2020 20:27:42 GMT http://community.qnx.com/sf/go/post120185 Dave Nickerson 2020-01-27T20:27:42Z post120180: Re: stat() timestamps for directories http://community.qnx.com/sf/go/post120180 Hi Lauri, maybe writing a resource manager that monitors the creation of files under /dev/shmem could be Your the solution. There exists a programming example for something like that: http://www.qnx.com/support/knowledgebase.html?id=50130000000nK2t Regards, Michael. Fri, 24 Jan 2020 06:28:24 GMT http://community.qnx.com/sf/go/post120180 Michael Kurt 2020-01-24T06:28:24Z post120179: Re: stat() timestamps for directories http://community.qnx.com/sf/go/post120179 Thanks, Elad! There's then explanation, I can't use st_mtime for this purpose. I need to fall back to scanning the whole directory (unless some other way exists). Lauri Thu, 23 Jan 2020 09:03:56 GMT http://community.qnx.com/sf/go/post120179 Lauri Kaila 2020-01-23T09:03:56Z post120174: Re: renesas r-car m3 http://community.qnx.com/sf/go/post120174 H3 and M3 are certainly different boards, and may have different memory layout. If you have documentation for your board then the first step would be to check whether the load address specified in the build file for the BSP matches the one for the board you are using. --Elad ________________________________________ From: Sergey Nazarkin(deleted) <community-noreply@qnx.com> Sent: 21 January 2020 03:46:52 To: ostech-core_os Subject: renesas r-car m3 Hi! I'm trying to launch qnx7.0 on renesas r-car starter kit pro(m3) but gain no success. The console shows no output and the board is not pinged once I downloaded and launched ifs-rcar_h3.bin image from uboot. Is this board truly supported? I see it is listed at http://blackberry.qnx.com/en/support/qnx-board-support-packages, but in bsp names for H3. I followed instructions from "BSP User's Guide Renesas R-Car V3M Starter Kit" and tried different loaders with same result. Could anybody help with this problem? /Serg _______________________________________________ OSTech http://community.qnx.com/sf/go/post120167 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 22 Jan 2020 12:31:02 GMT http://community.qnx.com/sf/go/post120174 Elad Lahav 2020-01-22T12:31:02Z post120173: Re: renesas r-car m3 http://community.qnx.com/sf/go/post120173 H3 and M3 are certainly different boards, and may have different memory layout. If you have documentation for your board then the first step would be to check whether the load address specified in the build file for the BSP matches the one for the board you are using. --Elad ________________________________________ From: Sergey Nazarkin(deleted) <community-noreply@qnx.com> Sent: 21 January 2020 03:46:52 To: ostech-core_os Subject: renesas r-car m3 Hi! I'm trying to launch qnx7.0 on renesas r-car starter kit pro(m3) but gain no success. The console shows no output and the board is not pinged once I downloaded and launched ifs-rcar_h3.bin image from uboot. Is this board truly supported? I see it is listed at http://blackberry.qnx.com/en/support/qnx-board-support-packages, but in bsp names for H3. I followed instructions from "BSP User's Guide Renesas R-Car V3M Starter Kit" and tried different loaders with same result. Could anybody help with this problem? /Serg _______________________________________________ OSTech http://community.qnx.com/sf/go/post120167 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 22 Jan 2020 12:29:51 GMT http://community.qnx.com/sf/go/post120173 Elad Lahav 2020-01-22T12:29:51Z post120172: Re: stat() timestamps for directories http://community.qnx.com/sf/go/post120172 Please note that /dev/shmem is not a directory. It is a mount point for the resource manager that provides the path for shared memory objects. The distributed nature of the QNX path space management means that every resource manager is free to implement this functionality in whatever way it wants, which can lead to inconsistencies. I'm not saying that your expectation of /dev/shmem is wrong, but the implementation for this particular resource manager just returns the current time if you ask about the mount point. --Elad ________________________________________ From: Lauri Kaila <community-noreply@qnx.com> Sent: 22 January 2020 06:25:44 To: ostech-core_os Subject: stat() timestamps for directories Hi, The online manual doesn't say how file timestamps are updated for directories. http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.lib_ref/topic/s/stat_struct.html So my question is, when does QNX update st_mtime for directories? I was hoping that stat("/dev/shmem/") would tell if some process has created a new shared memory object. However, I'm observing that mtime is constantly updating, even if no shm objects seem to be created/removed. Also /dev/shmem/slogger2/ timestamp seems to be constantly updating, even the mtime of each file in that direcory is not changed. Thanks, Lauri _______________________________________________ OSTech http://community.qnx.com/sf/go/post120171 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 22 Jan 2020 12:28:44 GMT http://community.qnx.com/sf/go/post120172 Elad Lahav 2020-01-22T12:28:44Z post120171: stat() timestamps for directories http://community.qnx.com/sf/go/post120171 Hi, The online manual doesn't say how file timestamps are updated for directories. http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.lib_ref/topic/s/stat_struct.html So my question is, when does QNX update st_mtime for directories? I was hoping that stat("/dev/shmem/") would tell if some process has created a new shared memory object. However, I'm observing that mtime is constantly updating, even if no shm objects seem to be created/removed. Also /dev/shmem/slogger2/ timestamp seems to be constantly updating, even the mtime of each file in that direcory is not changed. Thanks, Lauri Wed, 22 Jan 2020 11:25:44 GMT http://community.qnx.com/sf/go/post120171 Lauri Kaila 2020-01-22T11:25:44Z post120167: renesas r-car m3 http://community.qnx.com/sf/go/post120167 Hi! I'm trying to launch qnx7.0 on renesas r-car starter kit pro(m3) but gain no success. The console shows no output and the board is not pinged once I downloaded and launched ifs-rcar_h3.bin image from uboot. Is this board truly supported? I see it is listed at http://blackberry.qnx.com/en/support/qnx-board-support-packages, but in bsp names for H3. I followed instructions from "BSP User's Guide Renesas R-Car V3M Starter Kit" and tried different loaders with same result. Could anybody help with this problem? /Serg Tue, 21 Jan 2020 08:46:52 GMT http://community.qnx.com/sf/go/post120167 Sergey Nazarkin(deleted) 2020-01-21T08:46:52Z post120164: Re: openmp poor performance http://community.qnx.com/sf/go/post120164 Hi, note: all I know about OpenMP is what I just found with a quick search ... so take anything I say with caution 😉 In general, please supply as much information as possible when writing things like "better performance", eg: - what are the actual numbers? (or even more generally, what is considered "better performance"?) - how was this measured? - is this reproducable? - what else did you try do understand what's going on, and what were the results? looking at your example, and comparing to what I found, I believe you may have missed segmenting 'c' into per-thread sections, and you may have heavy contention when writing to this array. HTH -- Michael ________________________________ From: Wenbin Wang <community-noreply@qnx.com> Sent: Tuesday, January 21, 2020 06:18 To: ostech-core_os Subject: openmp poor performance openmp performance is much worth in multi-threads mode than single thread mode. code: ``` #include <stdio.h> #include <omp.h> #define N 10000 int main(int argc, char** argv) { float a[N], b[N], c[N]; int i; for (i = 0; i < N; i++) { a[i] = i * 2.0; b[i] = i * 3.0; } #pragma omp parallel num_threads(4) shared(a, b, c) private(i) for (size_t j = 0; j < 10000; ++j) { #pragma omp for for (i = 0; i < N; i++) { c[i] = a[i] + b[i]; VLOG(3) << c[i]; } } } ``` change num_threads(4) to num_threads(1) gives better performance. any idea why? _______________________________________________ OSTech http://community.qnx.com/sf/go/post120163 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 21 Jan 2020 05:51:23 GMT http://community.qnx.com/sf/go/post120164 Michael Schuster 2020-01-21T05:51:23Z post120163: openmp poor performance http://community.qnx.com/sf/go/post120163 openmp performance is much worth in multi-threads mode than single thread mode. code: ``` #include <stdio.h> #include <omp.h> #define N 10000 int main(int argc, char** argv) { float a[N], b[N], c[N]; int i; for (i = 0; i < N; i++) { a[i] = i * 2.0; b[i] = i * 3.0; } #pragma omp parallel num_threads(4) shared(a, b, c) private(i) for (size_t j = 0; j < 10000; ++j) { #pragma omp for for (i = 0; i < N; i++) { c[i] = a[i] + b[i]; VLOG(3) << c[i]; } } } ``` change num_threads(4) to num_threads(1) gives better performance. any idea why? Tue, 21 Jan 2020 05:18:21 GMT http://community.qnx.com/sf/go/post120163 Wenbin Wang 2020-01-21T05:18:21Z post120137: Re: PCI 2.x devices not supported by QNX 7.0 http://community.qnx.com/sf/go/post120137 Ok ... in order to support 32-bit PCI 2.x adapter for QNX 7.0 I'm going to develop my own 64-bit PCI server. It will be just a standard resource manager dealing only with 32-bit PCI card bus adapter. Armin Steinhoff Fri, 10 Jan 2020 18:17:46 GMT http://community.qnx.com/sf/go/post120137 Armin Steinhoff(deleted) 2020-01-10T18:17:46Z post120122: Re: Moving resource manager to IFS (primary image) http://community.qnx.com/sf/go/post120122 Hi Thomas, you are mixing up two different things. The path src/hardware is where the sources reside. That has nothing to do with where the final executable resides. If you want to have your resource manager (or any other binary) inside the IFS, you need to edit the build file of the image and simply add the name of your executable (and possibly libraries that it depends upon which are not yet in the image) to the list of binaries. You may have to adjust the search path by specifying [search=] attribute. After rebuilding the image you can verify that your program is actually added to it by using either dumpifs tool or launch mkifs with -vvvvv so that it prints all binaries that it adds to stdout. Then you transfer the new IFS as usual to the target and reboot. Hope this helps, -Albrecht Fri, 20 Dec 2019 13:55:30 GMT http://community.qnx.com/sf/go/post120122 Albrecht Uhlmann 2019-12-20T13:55:30Z post120121: Moving resource manager to IFS (primary image) http://community.qnx.com/sf/go/post120121 Hi I would like to know what is the procedure to move the resource manager inside the ifs. At present it is inside the external file system (UFS). the current path of the resource manager is /src/hardware. Do let me know Fri, 20 Dec 2019 04:56:43 GMT http://community.qnx.com/sf/go/post120121 Sobin Thomas 2019-12-20T04:56:43Z post120113: Re: Resource Manager threads ( Max number of threads) http://community.qnx.com/sf/go/post120113 Hi Thomas, I don't think that there are general recommendations that are always valid. It largely depends on the nature of your resource manager. Here are some questions that you might want to ask yourself: - How dynamic is the load on your resource manager expected? Is it a more steady state software where load oscillates slightly around some avarage, or do you expect large load peaks, maybe even aperiodically? - Can you actually handle multiple requests truly in parallel? For instance, if the resource manager needs to access some backend storage or hardware to fulfil a task, then a high number of running threads would not help at all if they all queue up on a lock on such a resource. - Is a realtime response to a request necessary, and what is the expected reaction time? So depending on how the answers look like, here are some properties that I came across: - W.r.t. realtime, the most critical part is the "increment", because it is evaluated after receiving, but prior (!) to handling a message. To be more clear, if the resource manager receives a message, and it finds that the number of RECEIVE blocked threads is below lo_water, it creates "increment" new threads prior to calling the handler for the message, which can spoil realtime responsiveness. - If you expect large load peaks AND can truly handle them in parallel AND the handling may enter blocking states other than acquiring internal locks, you can set the maximum above 20, so that the bulk work can be done faster. - Maximum should be well above hi_water, since otherwise the thread pool would need todestroy threads even though there are no more threads in RECEIVE blocked state. - Alternatively, you can create steady-state pools by setting all attributes to the same value if you have rather constant load on your resource manager. W.r.t. resource usage, if the threads use a dynamically allocated stack I think in nowadays systems the resources used by blocked threads weigh less than the resulting speed in software operation. Hope this helps, just do some experiments and compare behaviour. Regards, Albrecht Wed, 18 Dec 2019 10:30:45 GMT http://community.qnx.com/sf/go/post120113 Albrecht Uhlmann 2019-12-18T10:30:45Z post120112: Resource Manager threads ( Max number of threads) http://community.qnx.com/sf/go/post120112 Hi I am writing multi threaded resource manager , and came across this below document which explains about the threadpool http://www.qnx.com/developers/docs/qnxcar2/index.jsp?topic=%2Fcom.qnx.doc.neutrino.getting_started%2Ftopic%2Fs1_procs_tpool.html I would like to know which is optimistic approach, i am keeping the settings as pool_attr.lo_water = 3; pool_attr.hi_water = 20; pool_attr.increment = 1; pool_attr.maximum = 20; Would like to know if we keep maximum threads as > 20 will it cause system to hang i mean will it demand more resources like cache, memory and CPU. Or do we need to keep at lower side. What happens if the increment is more than 1 how it will effect the performance. Do i keep it as 1. Tue, 17 Dec 2019 13:07:27 GMT http://community.qnx.com/sf/go/post120112 Sobin Thomas 2019-12-17T13:07:27Z post120098: problem('memory fault') about graphics driver in am437x platform in sdp6.6 http://community.qnx.com/sf/go/post120098 I've already configed the graphics-am437x-gp-evm.build file and added the graphics.conf file to the target. After OS image started,when I input command 'screen', it prompts 'memory fault'.How can I solve this problem? The attached file is my graphics.conf and os build file. Tue, 10 Dec 2019 04:49:12 GMT http://community.qnx.com/sf/go/post120098 Guifa Li 2019-12-10T04:49:12Z post120083: Re: RE: QNX7.0 iMX6 BSP fails to compile http://community.qnx.com/sf/go/post120083 thaks very much! bsp fixed /src/hardware/devc/common.mk LIBS+=io-char drvr smmu It should be nice if bsp in QNX software center will be updated too :-) M. Sangalli Fri, 15 Nov 2019 11:27:18 GMT http://community.qnx.com/sf/go/post120083 mario sangalli 2019-11-15T11:27:18Z post120082: RE: QNX7.0 iMX6 BSP fails to compile http://community.qnx.com/sf/go/post120082 You need to add -lsmmu to the link command. --Elad ________________________________________ From: mario sangalli [community-noreply@qnx.com] Sent: November-14-19 12:28 PM To: ostech-core_os Subject: QNX7.0 iMX6 BSP fails to compile Hi, I've recently upgraded the QNX7 Momentics via QNX Software centre and the imx6 bsp has failed to compile the devc-sermx1 driver: /builds/workspace/BC700_6762_sdp704/build_dir/lib/io-char/ttc.c:481: undefined reference to `smmu_init' What is changed? Is the imx6 bps no more alligned to latest OS upgrade? Any help will be appreciate Thank M. Sangalli >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> D:/qnx700/host/win64/x86_64/usr/bin/rm -f C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1/arm/le.v7/devc-sermx1 D:/qnx700/host/win64/x86_64/usr/bin/qcc -Vgcc_ntoarmv7 -Wl,--no-keep-memory -o C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1/arm/le.v7/devc-sermx1 externs.o init.o intr.o main.o options.o tto.o -L. -LC:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/../../../install/usr/lib/xilinx -LC:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/../../../install/armle-v7/lib -LC:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/../../../install/armle-v7/usr/lib -LD:/qnx700/target/qnx7/armle-v7/lib -LD:/qnx700/target/qnx7/armle-v7/usr/lib -Wl,--rpath-link,. -Wl,--rpath-link,C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/../../../install/usr/lib/xilinx -Wl,--rpath-link,C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/../../../install/armle-v7/lib -Wl,--rpath-link,C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/../../../install/armle-v7/usr/lib -Wl,--rpath-link,D:/qnx700/target/qnx7/armle-v7/lib -Wl,--rpath-link,D:/qnx700/target/qnx7/armle-v7/usr/lib -lio-char -ldrvr -EL D:/qnx700/target/qnx7/armle-v7/usr/lib\libio-char.a(ttc.o): In function `ttc': /builds/workspace/BC700_6762_sdp704/build_dir/lib/io-char/ttc.c:481: undefined reference to `smmu_init' D:/qnx700/target/qnx7/usr/include/mk/qtargets.mk:43: recipe for target 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1/arm/le.v7/devc-sermx1' failed cc: D:/qnx700/host/win64/x86_64/usr/bin/arm-unknown-nto-qnx7.0.0eabi-ld caught signal 1 make[6]: Leaving directory 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1/arm/le.v7' make[6]: *** [C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1/arm/le.v7/devc-sermx1] Error 1 recurse.mk:96: recipe for target 'all' failed make[5]: *** [all] Error 2 make[5]: Leaving directory 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1/arm' recurse.mk:96: recipe for target 'all' failed make[4]: *** [all] Error 2 make[4]: Leaving directory 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1' make[3]: *** [all] Error 2 recurse.mk:96: recipe for target 'all' failed make[2]: *** [all] Error 2 make[3]: Leaving directory 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc' make[1]: *** [all] Error 2 recurse.mk:96: recipe for target 'all' failed make: *** [install] Error 2 make[2]: Leaving directory 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware' recurse.mk:96: recipe for target 'all' failed make[1]: Leaving directory 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src' Makefile:33: recipe for target 'install' failed _______________________________________________ OSTech http://community.qnx.com/sf/go/post120081 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 14 Nov 2019 18:09:26 GMT http://community.qnx.com/sf/go/post120082 Elad Lahav 2019-11-14T18:09:26Z post120081: QNX7.0 iMX6 BSP fails to compile http://community.qnx.com/sf/go/post120081 Hi, I've recently upgraded the QNX7 Momentics via QNX Software centre and the imx6 bsp has failed to compile the devc-sermx1 driver: /builds/workspace/BC700_6762_sdp704/build_dir/lib/io-char/ttc.c:481: undefined reference to `smmu_init' What is changed? Is the imx6 bps no more alligned to latest OS upgrade? Any help will be appreciate Thank M. Sangalli >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> D:/qnx700/host/win64/x86_64/usr/bin/rm -f C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1/arm/le.v7/devc-sermx1 D:/qnx700/host/win64/x86_64/usr/bin/qcc -Vgcc_ntoarmv7 -Wl,--no-keep-memory -o C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1/arm/le.v7/devc-sermx1 externs.o init.o intr.o main.o options.o tto.o -L. -LC:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/../../../install/usr/lib/xilinx -LC:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/../../../install/armle-v7/lib -LC:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/../../../install/armle-v7/usr/lib -LD:/qnx700/target/qnx7/armle-v7/lib -LD:/qnx700/target/qnx7/armle-v7/usr/lib -Wl,--rpath-link,. -Wl,--rpath-link,C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/../../../install/usr/lib/xilinx -Wl,--rpath-link,C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/../../../install/armle-v7/lib -Wl,--rpath-link,C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/../../../install/armle-v7/usr/lib -Wl,--rpath-link,D:/qnx700/target/qnx7/armle-v7/lib -Wl,--rpath-link,D:/qnx700/target/qnx7/armle-v7/usr/lib -lio-char -ldrvr -EL D:/qnx700/target/qnx7/armle-v7/usr/lib\libio-char.a(ttc.o): In function `ttc': /builds/workspace/BC700_6762_sdp704/build_dir/lib/io-char/ttc.c:481: undefined reference to `smmu_init' D:/qnx700/target/qnx7/usr/include/mk/qtargets.mk:43: recipe for target 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1/arm/le.v7/devc-sermx1' failed cc: D:/qnx700/host/win64/x86_64/usr/bin/arm-unknown-nto-qnx7.0.0eabi-ld caught signal 1 make[6]: Leaving directory 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1/arm/le.v7' make[6]: *** [C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1/arm/le.v7/devc-sermx1] Error 1 recurse.mk:96: recipe for target 'all' failed make[5]: *** [all] Error 2 make[5]: Leaving directory 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1/arm' recurse.mk:96: recipe for target 'all' failed make[4]: *** [all] Error 2 make[4]: Leaving directory 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc/sermx1' make[3]: *** [all] Error 2 recurse.mk:96: recipe for target 'all' failed make[2]: *** [all] Error 2 make[3]: Leaving directory 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware/devc' make[1]: *** [all] Error 2 recurse.mk:96: recipe for target 'all' failed make: *** [install] Error 2 make[2]: Leaving directory 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src/hardware' recurse.mk:96: recipe for target 'all' failed make[1]: Leaving directory 'C:/Users/MSangalli/ide-7.0-workspace/bsp-nxp-mx6x-sabreARD/src' Makefile:33: recipe for target 'install' failed Thu, 14 Nov 2019 17:28:48 GMT http://community.qnx.com/sf/go/post120081 mario sangalli 2019-11-14T17:28:48Z post120075: Re: RE: running PPS on a read-only filesystem http://community.qnx.com/sf/go/post120075 found it, it went straight to /tmp Tue, 05 Nov 2019 16:05:08 GMT http://community.qnx.com/sf/go/post120075 Andrew Nikitin 2019-11-05T16:05:08Z post120074: RE: running PPS on a read-only filesystem http://community.qnx.com/sf/go/post120074 Make sure you have dumper running. See the dumper documentation for where core files are created. --Elad ________________________________________ From: Andrew Nikitin [community-noreply@qnx.com] Sent: November-05-19 10:41 AM To: ostech-core_os Subject: Re: RE: running PPS on a read-only filesystem > can you send the corefile created with the crash? Where should it be created? I looked in /mnt/ssd/tmp (since that what I specified in -D option) but nothing is there after the crash. _______________________________________________ OSTech http://community.qnx.com/sf/go/post120073 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 05 Nov 2019 15:48:05 GMT http://community.qnx.com/sf/go/post120074 Elad Lahav 2019-11-05T15:48:05Z post120073: Re: RE: running PPS on a read-only filesystem http://community.qnx.com/sf/go/post120073 > can you send the corefile created with the crash? Where should it be created? I looked in /mnt/ssd/tmp (since that what I specified in -D option) but nothing is there after the crash. Tue, 05 Nov 2019 15:41:28 GMT http://community.qnx.com/sf/go/post120073 Andrew Nikitin 2019-11-05T15:41:28Z post120071: RE: running PPS on a read-only filesystem http://community.qnx.com/sf/go/post120071 Note that PPS is a resource manager that creates its own file system at the given mount point. The fact that /readonly is the mount point of a read-only file system has not impact on PPS mounted at /readonly/pps. The mount point are just path space prefixes and do not create any dependency among the resource managers. The bottom line is that whatever problem you have with PPS it has nothing to do with the root FS. --Elad ________________________________________ From: Andrew Nikitin [community-noreply@qnx.com] Sent: November-04-19 4:27 PM To: ostech-core_os Subject: running PPS on a read-only filesystem Hello, I have trouble running pps. Here is my setup. My root fs is read-only. Writable ssd is mounted as /mnt/ssd. I created directories /mnt/ssd/pps and /mnt/ssd/tmp in it. PPS executable is not ncluded in system image. I copy pps binary to /mnt/ssd/bin I start pps with pps -b -ggggg -p /mnt/ssd/pps/ -D /mnt/ssd/tmp After that can see /pps created But when I try mkdir -p /pps/qnx/qdb ls /pps I get ls: readdir of '/pps' failed (No such process) I get the following messages from "pps -b" before failure: pps: NOTICE: PPS initializing pps: NOTICE: PPS attaching /pps pps: NOTICE: PPS attached /pps major 2 minor 4 pps: NOTICE: PPS starting Process 856091 (pps) terminated SIGSEGV code=1 fltno=11 ip=000000393ce3b14c(/mnt/ssd/bin/pps@io_read+0x000000000000032c) mapaddr=000000000000b14c. ref=00000000d8d750f8 Memory fault (core dumped) How do I run pps? _______________________________________________ OSTech http://community.qnx.com/sf/go/post120068 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 05 Nov 2019 11:57:25 GMT http://community.qnx.com/sf/go/post120071 Elad Lahav 2019-11-05T11:57:25Z post120070: RE: running PPS on a read-only filesystem http://community.qnx.com/sf/go/post120070 can you send the corefile created with the crash? ________________________________________ From: Andrew Nikitin [community-noreply@qnx.com] Sent: Monday, November 04, 2019 22:27 To: ostech-core_os Subject: running PPS on a read-only filesystem Hello, I have trouble running pps. Here is my setup. My root fs is read-only. Writable ssd is mounted as /mnt/ssd. I created directories /mnt/ssd/pps and /mnt/ssd/tmp in it. PPS executable is not ncluded in system image. I copy pps binary to /mnt/ssd/bin I start pps with pps -b -ggggg -p /mnt/ssd/pps/ -D /mnt/ssd/tmp After that can see /pps created But when I try mkdir -p /pps/qnx/qdb ls /pps I get ls: readdir of '/pps' failed (No such process) I get the following messages from "pps -b" before failure: pps: NOTICE: PPS initializing pps: NOTICE: PPS attaching /pps pps: NOTICE: PPS attached /pps major 2 minor 4 pps: NOTICE: PPS starting Process 856091 (pps) terminated SIGSEGV code=1 fltno=11 ip=000000393ce3b14c(/mnt/ssd/bin/pps@io_read+0x000000000000032c) mapaddr=000000000000b14c. ref=00000000d8d750f8 Memory fault (core dumped) How do I run pps? _______________________________________________ OSTech http://community.qnx.com/sf/go/post120068 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 05 Nov 2019 10:38:40 GMT http://community.qnx.com/sf/go/post120070 John Kearney 2019-11-05T10:38:40Z post120068: running PPS on a read-only filesystem http://community.qnx.com/sf/go/post120068 Hello, I have trouble running pps. Here is my setup. My root fs is read-only. Writable ssd is mounted as /mnt/ssd. I created directories /mnt/ssd/pps and /mnt/ssd/tmp in it. PPS executable is not ncluded in system image. I copy pps binary to /mnt/ssd/bin I start pps with pps -b -ggggg -p /mnt/ssd/pps/ -D /mnt/ssd/tmp After that can see /pps created But when I try mkdir -p /pps/qnx/qdb ls /pps I get ls: readdir of '/pps' failed (No such process) I get the following messages from "pps -b" before failure: pps: NOTICE: PPS initializing pps: NOTICE: PPS attaching /pps pps: NOTICE: PPS attached /pps major 2 minor 4 pps: NOTICE: PPS starting Process 856091 (pps) terminated SIGSEGV code=1 fltno=11 ip=000000393ce3b14c(/mnt/ssd/bin/pps@io_read+0x000000000000032c) mapaddr=000000000000b14c. ref=00000000d8d750f8 Memory fault (core dumped) How do I run pps? Mon, 04 Nov 2019 21:27:56 GMT http://community.qnx.com/sf/go/post120068 Andrew Nikitin 2019-11-04T21:27:56Z post120062: slogger2: missing option '-u' for forwarding output to kerneltrace http://community.qnx.com/sf/go/post120062 With 'slogger -u eventid' it was possible to forward slogger data to kerneltrace (QNX6.x.x). This was very useful to synchronize slogger output of applications with kerneltrace events. slogger2 does not provide this option (QNX7). Is this feature lost by accident or is this removed intentionelly? Is it possible to re-add this helpful option? Thu, 24 Oct 2019 10:21:53 GMT http://community.qnx.com/sf/go/post120062 Thomas Schickentanz(deleted) 2019-10-24T10:21:53Z post120061: Re: how to emmc boot QNX on beaglebone black? http://community.qnx.com/sf/go/post120061 Were you finally successful in loading QNX in eMMC and boot? Can you please brief on the steps followed? Thu, 24 Oct 2019 08:15:24 GMT http://community.qnx.com/sf/go/post120061 Geetha Andrew(deleted) 2019-10-24T08:15:24Z post120060: Re: how to emmc boot QNX on beaglebone black? http://community.qnx.com/sf/go/post120060 Were you finally successful in loading QNX in eMMC and boot? Can you please brief on the steps followed? Thanks Wed, 23 Oct 2019 05:44:49 GMT http://community.qnx.com/sf/go/post120060 Geetha Andrew(deleted) 2019-10-23T05:44:49Z post120052: resmgr_msgreply errors http://community.qnx.com/sf/go/post120052 Hi, We're using resmgr_msgreply for a custom driver running on Arm A53, targeting PS DMA on Zynq. QNX 7.0.1 on custom bsp from QNX. The buffer passed to resmgr_msgreply is pre-allocated via mmap64 to be physically contiguous. We need this, as the mem is used by the DMA. resmgr_msgreply is called from a separate thread with previously saved receive id in resmgr_context_t. buffer = mmap64( 0, buf_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_PHYS | MAP_ANON, NOFD, 0); Seeing some odd behavior: 1. Sometimes EENDIAN errno is set after this call. 2. Sometimes getting segmentation fault. 3. Other times it works just fine. Any thoughts on what could be causing these non-repeatable issues? thx, --- Wed, 16 Oct 2019 15:46:39 GMT http://community.qnx.com/sf/go/post120052 Jignesh Desai 2019-10-16T15:46:39Z post120036: Re: First time device open is taking more time http://community.qnx.com/sf/go/post120036 Hi Thomas, sounds plausible. I remember having read that the Thread Pool evaluates if new threads need to be created after reception, but before processing a new message. If your thread pool was configured such that the number of pre-existing threads is less than number of RECEIVE blocked threads, this will cause the issue. Bu this means that depending on the nature of your resource manager, if it has potentially many clients, each client may occcasionally expereince the same delay at runtime. Some people create a steady-state thread pool by having all four attributes set to the same value. Regards, Albrecht Mon, 14 Oct 2019 15:26:39 GMT http://community.qnx.com/sf/go/post120036 Albrecht Uhlmann 2019-10-14T15:26:39Z post120032: Re: First time device open is taking more time http://community.qnx.com/sf/go/post120032 Hi It seems there was problem in the configuration of maximum number of threads in blocked state. This is very strange. The resource manager is multithreaded resource manager and not sure why the configuration will effect in this way. regards Sobin Mon, 14 Oct 2019 09:42:09 GMT http://community.qnx.com/sf/go/post120032 Sobin Thomas 2019-10-14T09:42:09Z post120031: Re: First time device open is taking more time http://community.qnx.com/sf/go/post120031 Hi Thanks for prompt reply I tried allocating stack space of 500 bytes using alloca Also tried moving the resource manager executable to ram file system by cp /dev/driver1 /dev/shmem also tried cp /dev/driver1 /tmp Unfortunately its not causing any difference in the time. Can you tell me any other way to move the resource manager code to RAM. Can you help here. Also let me know how to use kernel trace. regards Sobin Fri, 11 Oct 2019 15:25:37 GMT http://community.qnx.com/sf/go/post120031 Sobin Thomas 2019-10-11T15:25:37Z post120030: Re: First time device open is taking more time http://community.qnx.com/sf/go/post120030 Two things can contribute to thie first-time delay: 1) loading code of your resource manager that never ran before from media into RAM. Later, it will come from cache. 2) allocating stack pages on first use. regarding 1), try to copy executable to RAM disk and see if this has an influence regarding 2), make all stacks not-lazy, or do a suffucient dummy alloca() statement to force stack page allcoation (remember, main() thread stack attributed cannot be changed since it is already running) You can also run a kernel trace while doing the first accesses to your resource manager, and you will see both events. Regards, Albrecht Fri, 11 Oct 2019 14:29:30 GMT http://community.qnx.com/sf/go/post120030 Albrecht Uhlmann 2019-10-11T14:29:30Z post120029: First time device open is taking more time http://community.qnx.com/sf/go/post120029 Hi I have written a resource manager in this when first time device is opened the time taken is taking around 134 ms. But later on it is taking only 0us. I am not sure why this is taking this time as i am not doing any thing specific in open also it is not doing any device specific operation. i am doing just open ("/dev/dev1/device1") followed by this i am opening second device then third altogether i am opening 5 devices. Strange part is first time device open is taking this time. for second and third devices it is taking only 0 us. If i interchange the calling order of devices for e.g. if i open device 2 then device 1. then device2 open will take 132 ms Any suggestion is of great help Regards sobin Fri, 11 Oct 2019 14:07:40 GMT http://community.qnx.com/sf/go/post120029 Sobin Thomas 2019-10-11T14:07:40Z post120026: Re: SATA on AM572x - QNX7 http://community.qnx.com/sf/go/post120026 Upon further Investigation, in slogger output, I can see that ahci doesn't take the IRQ parameter passed along with the driver devb-ahci-omap5 ahci ioport=0x4a140000,irq=86 blk cache=2M cam cache slogger output eide_identify_devices: AHCI (generic) vid 0x0000, did 0x0000, class 0x000000, rev 0x00, BDF B0:D0:F0, base 0x4a140000, irq 0x0 eide_identify: IDENTIFY failed: port 0, status d0, error 1 IRQ is reported as 0 even if its passed along with the driver. Any thoughts on this? devb-ahci-omap5 is a precompiled binary with the BSP there is no way I could debug this! Wed, 09 Oct 2019 15:11:32 GMT http://community.qnx.com/sf/go/post120026 Abilash Janakiraman 2019-10-09T15:11:32Z post120017: 6.5.0 slinger. metod POST not work? http://community.qnx.com/sf/go/post120017 I create simple page with 2 buttons and cgi script: ------------------------------------------------------------------------------------------------------------------------------------- <form action="index.shtml" method="post"> <button name="Password" value="123456">Send Post</button> </form> <form action="index.shtml" method="get"> <button name="Password" value="123456">Seng Get</button> </form> <!--#exec cgi="test.cgi" --> <p>Method: <!--#echo var="REQUEST_METHOD"--> <p>Query string: <!--#echo var="QUERY_STRING"--> <p>CONTENT_TYPE: <!--#echo var="CONTENT_TYPE"--> <p>CONTENT_LENGTH: <!--#echo var="CONTENT_LENGTH"--> ------------------------------------------------------------------------------------------------------------------------------------- Here test script: #!/bin/sh PASSWORD=`echo $QUERY_STRING | sed -n 's/^.*Password=\([^&]*\).*$/\1/p'` echo "<p>Password= $PASSWORD !" ------------------------------------------------------------------------------------------------------------------------------------- GET metod work fine Result with GET button : Password= 123456 ! Method: GET Query string: Password=123456 CONTENT_TYPE: CONTENT_LENGTH: Button with POST metod not work Result with POST button: Password= ! Method: POST Query string: CONTENT_TYPE: application/x-www-form-urlencoded CONTENT_LENGTH: 15 ------------------------------------------------------------------------------------------------------------------------------------- I can get the length of the string, type, but I can't get the content. The variable QUERY_STRING is empty. Tue, 01 Oct 2019 13:37:12 GMT http://community.qnx.com/sf/go/post120017 Fedor Gruzdev(deleted) 2019-10-01T13:37:12Z post120003: RE: RE: How to connect GDB to the target http://community.qnx.com/sf/go/post120003 you will need qconn and pdebug on the tareget then start qconn http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.user_guide/topic/security_qconn.html it should default to port 8000 ________________________________________ From: Sobin Thomas [community-noreply@qnx.com] Sent: Friday, September 27, 2019 12:02 To: ostech-core_os Subject: Re: RE: How to connect GDB to the target Hi Thanks, but i need more info than that like how to load the agent _______________________________________________ OSTech http://community.qnx.com/sf/go/post120001 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 27 Sep 2019 12:05:11 GMT http://community.qnx.com/sf/go/post120003 John Kearney 2019-09-27T12:05:11Z post120001: Re: RE: How to connect GDB to the target http://community.qnx.com/sf/go/post120001 Hi Thanks, but i need more info than that like how to load the agent Fri, 27 Sep 2019 10:02:11 GMT http://community.qnx.com/sf/go/post120001 Sobin Thomas 2019-09-27T10:02:11Z post119994: Writing a security policy http://community.qnx.com/sf/go/post119994 I am new to QNX. I am exploring the qnx security policies. I am running qnx 7 in a vmware virtual box(x86_64). I wrote a sample server and client program. I wanted to write a policy and to attach it to the process. My main aim is access control. Following sections in the qnx guide have information about them. http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.security.dev_guide/topic/manual/mac.html http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.security.dev_guide/topic/manual/tutorial.html As per the above guide, Startup script needs to be edited and following utilities are required for developing a security policy - secpol, secpolcompile, secpolgenerate, secpolmonitor, secpolpush I was able to find only secpolgenerate and secpolmonitor. Other utilities are missing. I also could not find the startup script. Since I am new to these topics, I am looking for some help in generating the security policy. Thanks and best regards, Ganesha Thu, 26 Sep 2019 09:10:59 GMT http://community.qnx.com/sf/go/post119994 Ganesha Mulleria 2019-09-26T09:10:59Z post119966: RE: How to get the kernel and data address http://community.qnx.com/sf/go/post119966 To translate the addresses to symbols you need to build your IFS with [+keeplinked] on the procnto line. That will generate a procnto-smp-instr.sym file, which contains the necessary debug symbols. --Elad ________________________________________ From: John Kearney [community-noreply@qnx.com] Sent: September-19-19 4:19 AM To: ostech-core_os@community.qnx.com Subject: RE: How to get the kernel and data address I should clarify there that the C value in the output it the address of the main function, not he actual base address. ________________________________________ From: John Kearney Sent: Thursday, September 19, 2019 09:30 To: ostech-core_os@community.qnx.com Subject: RE: How to get the kernel and data address Have you seen http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.technotes/topic/proc_dump.html Cheers John ________________________________________ From: Sobin Thomas [community-noreply@qnx.com] Sent: Thursday, September 19, 2019 05:45 To: ostech-core_os Subject: How to get the kernel and data address Hi I was going through this link to get some more insight on the kernel dump. I am new to QNX. I want to know how to get the Location of the kernel's code and data. As it is a virtual address, any possible way which file we need to refer to ? For eg in Linux we leverage vmlinux file. _______________________________________________ OSTech http://community.qnx.com/sf/go/post119961 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post119965 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 19 Sep 2019 10:16:57 GMT http://community.qnx.com/sf/go/post119966 Elad Lahav 2019-09-19T10:16:57Z post119965: RE: How to get the kernel and data address http://community.qnx.com/sf/go/post119965 I should clarify there that the C value in the output it the address of the main function, not he actual base address. ________________________________________ From: John Kearney Sent: Thursday, September 19, 2019 09:30 To: ostech-core_os@community.qnx.com Subject: RE: How to get the kernel and data address Have you seen http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.technotes/topic/proc_dump.html Cheers John ________________________________________ From: Sobin Thomas [community-noreply@qnx.com] Sent: Thursday, September 19, 2019 05:45 To: ostech-core_os Subject: How to get the kernel and data address Hi I was going through this link to get some more insight on the kernel dump. I am new to QNX. I want to know how to get the Location of the kernel's code and data. As it is a virtual address, any possible way which file we need to refer to ? For eg in Linux we leverage vmlinux file. _______________________________________________ OSTech http://community.qnx.com/sf/go/post119961 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 19 Sep 2019 08:19:50 GMT http://community.qnx.com/sf/go/post119965 John Kearney 2019-09-19T08:19:50Z post119964: RE: How to connect GDB to the target http://community.qnx.com/sf/go/post119964 http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.prog/topic/using_gdb_SettingTarget.html target qnx <ip:port> Cheers ________________________________________ From: Sobin Thomas [community-noreply@qnx.com] Sent: Thursday, September 19, 2019 05:47 To: ostech-core_os Subject: How to connect GDB to the target Hi I want to use gdb to debug a hang issue I was referring to this link http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.prog/topic/using_gdb.html Is it necessary to have Momentics to connect GDB tool ? _______________________________________________ OSTech http://community.qnx.com/sf/go/post119962 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 19 Sep 2019 07:35:49 GMT http://community.qnx.com/sf/go/post119964 John Kearney 2019-09-19T07:35:49Z post119963: RE: How to get the kernel and data address http://community.qnx.com/sf/go/post119963 Have you seen http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.technotes/topic/proc_dump.html Cheers John ________________________________________ From: Sobin Thomas [community-noreply@qnx.com] Sent: Thursday, September 19, 2019 05:45 To: ostech-core_os Subject: How to get the kernel and data address Hi I was going through this link to get some more insight on the kernel dump. I am new to QNX. I want to know how to get the Location of the kernel's code and data. As it is a virtual address, any possible way which file we need to refer to ? For eg in Linux we leverage vmlinux file. _______________________________________________ OSTech http://community.qnx.com/sf/go/post119961 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 19 Sep 2019 07:30:51 GMT http://community.qnx.com/sf/go/post119963 John Kearney 2019-09-19T07:30:51Z post119962: How to connect GDB to the target http://community.qnx.com/sf/go/post119962 Hi I want to use gdb to debug a hang issue I was referring to this link http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.prog/topic/using_gdb.html Is it necessary to have Momentics to connect GDB tool ? Thu, 19 Sep 2019 03:47:30 GMT http://community.qnx.com/sf/go/post119962 Sobin Thomas 2019-09-19T03:47:30Z post119961: How to get the kernel and data address http://community.qnx.com/sf/go/post119961 Hi I was going through this link to get some more insight on the kernel dump. I am new to QNX. I want to know how to get the Location of the kernel's code and data. As it is a virtual address, any possible way which file we need to refer to ? For eg in Linux we leverage vmlinux file. Thu, 19 Sep 2019 03:45:15 GMT http://community.qnx.com/sf/go/post119961 Sobin Thomas 2019-09-19T03:45:15Z post119957: RE: RE: Installing QNX with Hyper-V [Student] http://community.qnx.com/sf/go/post119957 What does "ls /dev" show? ________________________________________ From: Étienne Bérubé [community-noreply@qnx.com] Sent: September-17-19 11:55 PM To: ostech-core_os Subject: Re: RE: Installing QNX with Hyper-V [Student] Hi, I managed to transfer the two VMDKs in VHDXs. However, I'm now stuck in the Hyper-V part and orchestration of the drives. The picture I attached showed where it failed. I took great care to copy any relevant information from the.VMX and tried my best to convert it into Hyper-V settings. I also tried booting with AP (whatever this means) without any success (but different error messages) Thank you _______________________________________________ OSTech http://community.qnx.com/sf/go/post119951 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 18 Sep 2019 15:22:06 GMT http://community.qnx.com/sf/go/post119957 Elad Lahav 2019-09-18T15:22:06Z post119951: Re: RE: Installing QNX with Hyper-V [Student] http://community.qnx.com/sf/go/post119951 Hi, I managed to transfer the two VMDKs in VHDXs. However, I'm now stuck in the Hyper-V part and orchestration of the drives. The picture I attached showed where it failed. I took great care to copy any relevant information from the.VMX and tried my best to convert it into Hyper-V settings. I also tried booting with AP (whatever this means) without any success (but different error messages) Thank you Wed, 18 Sep 2019 03:55:55 GMT http://community.qnx.com/sf/go/post119951 Étienne Bérubé(deleted) 2019-09-18T03:55:55Z post119950: RE: Installing QNX with Hyper-V [Student] http://community.qnx.com/sf/go/post119950 By the way, did you try running "migrate vmware to hyper-v" in a search engine? This is the first hit I get: https://www.nakivo.com/blog/how-to-convert-vmware-vm-to-hyper-v/ --Elad ________________________________________ From: Étienne Bérubé [community-noreply@qnx.com] Sent: September-17-19 1:09 PM To: ostech-core_os Subject: Re: RE: Installing QNX with Hyper-V [Student] Hi, Not that I am aware. I tried everything under my belt for 3-4h. Hyper-V does not accept .vmx files. Also, nothing worked to transfer a .vmx into a .iso. _______________________________________________ OSTech http://community.qnx.com/sf/go/post119947 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 17 Sep 2019 17:29:08 GMT http://community.qnx.com/sf/go/post119950 Elad Lahav 2019-09-17T17:29:08Z post119949: RE: Installing QNX with Hyper-V [Student] http://community.qnx.com/sf/go/post119949 OK, so if the easy way is blocked, you need to proceed with the slightly harder way. You will need to build an IFS (image file system), which has the bootable QNX image, including startup, the kernel, various drivers and services. The you will need to create a disk for Hyper-V, format it with QNX6 FS, copy the IFS under /.boot and run it. This may sound complicated, but should be much better explained in the documentation for the x86_64 generic BSP available on Software Centre. --Elad ________________________________________ From: Étienne Bérubé [community-noreply@qnx.com] Sent: September-17-19 1:09 PM To: ostech-core_os Subject: Re: RE: Installing QNX with Hyper-V [Student] Hi, Not that I am aware. I tried everything under my belt for 3-4h. Hyper-V does not accept .vmx files. Also, nothing worked to transfer a .vmx into a .iso. _______________________________________________ OSTech http://community.qnx.com/sf/go/post119947 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 17 Sep 2019 17:19:27 GMT http://community.qnx.com/sf/go/post119949 Elad Lahav 2019-09-17T17:19:27Z post119948: Re: Installing QNX with Hyper-V [Student] http://community.qnx.com/sf/go/post119948 Hi, The iso for the 6.5 is the Host iso. I am not very versed in QNX and my teacher did not explain anything. So from my very unofficial understanding, you need a host OS with an SDP (I have the 7.0 on windows) and a Target VM. When your code is ready, you ship it to your target VM and it executes it. Am I mistaken? I tried with the first iso you provided and it gets stuck as it does not see any partitions in my virtual disk. Other than that, it is a Host iso. Therefore, I am not sure if this is what I need...? For now, I have the software center installed with the SDP 7.0. I just need a "way" to run the code in a QNX VM (if I understood everything correctly). Tue, 17 Sep 2019 17:13:40 GMT http://community.qnx.com/sf/go/post119948 Étienne Bérubé(deleted) 2019-09-17T17:13:40Z post119947: Re: RE: Installing QNX with Hyper-V [Student] http://community.qnx.com/sf/go/post119947 Hi, Not that I am aware. I tried everything under my belt for 3-4h. Hyper-V does not accept .vmx files. Also, nothing worked to transfer a .vmx into a .iso. Tue, 17 Sep 2019 17:09:38 GMT http://community.qnx.com/sf/go/post119947 Étienne Bérubé(deleted) 2019-09-17T17:09:38Z post119941: Re: Installing QNX with Hyper-V [Student] http://community.qnx.com/sf/go/post119941 Hi Étienne, I'm wondering what version of QNX SDP you need? 6.5 or 7.0? For 6.5, the ISO can be found at: http://www.qnx.com/download/feature.html?programid=23647 For 7.0, I don't see any prebuilt ISO yet, but SDP 7 has an evaluation version, which can be found at http://blackberry.qnx.com/en/sdp7/sdp70_download. Your school might have access to that. Basically once the SDP 7 installed (either directly on your computer or in a VM, e.g. a Linux VM), you'd then be able to build images yourself, which can be used with QEMU, instead of VMware (If the problem was because Hyper-v running underneath). Would this way work for you? Let me know if you need help on this. Tue, 17 Sep 2019 13:43:32 GMT http://community.qnx.com/sf/go/post119941 Ronald Yu 2019-09-17T13:43:32Z post119937: RE: Installing QNX with Hyper-V [Student] http://community.qnx.com/sf/go/post119937 Does HyperV not have a VMWare import function? I'd be surprise if it doesn't. For the most part there is nothing VMWare-specific about the image. The main issue when migrating between hypervisors is the format of the virtual disk. (There are some exceptions, such as graphics and networking, but graphics is not currently supported in VMWare anyway, and networking is fairly standardized.) --Elad ________________________________________ From: Étienne Bérubé [community-noreply@qnx.com] Sent: September-16-19 11:54 PM To: ostech-core_os Subject: Installing QNX with Hyper-V [Student] Hi, I am using QNX for a University class. I have Hyper-V installed (using Docker for other classes). I know QNX has VMware images to install . However, Hyper-V and Vmware cannot run side-by-side. Therefore, is it possible to have an iso of the RTOS Neutrino to run? I would like to avoid rebooting my computer and deisabling Hyper-V between each of my assignments. Thank you _______________________________________________ OSTech http://community.qnx.com/sf/go/post119935 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 17 Sep 2019 11:46:48 GMT http://community.qnx.com/sf/go/post119937 Elad Lahav 2019-09-17T11:46:48Z post119935: Installing QNX with Hyper-V [Student] http://community.qnx.com/sf/go/post119935 Hi, I am using QNX for a University class. I have Hyper-V installed (using Docker for other classes). I know QNX has VMware images to install . However, Hyper-V and Vmware cannot run side-by-side. Therefore, is it possible to have an iso of the RTOS Neutrino to run? I would like to avoid rebooting my computer and deisabling Hyper-V between each of my assignments. Thank you Tue, 17 Sep 2019 03:54:14 GMT http://community.qnx.com/sf/go/post119935 Étienne Bérubé(deleted) 2019-09-17T03:54:14Z post119881: RE: Debugging memfault http://community.qnx.com/sf/go/post119881 Exactly the same way you do it on Linux (or any other OS on the planet). You build your code with debug symbols and you use a debugger. --Elad ________________________________________ From: Sobin Thomas [community-noreply@qnx.com] Sent: September-06-19 10:38 AM To: ostech-core_os Subject: Debugging memfault Hi Quite often i am getting memfault. Like linux do we have any method to know exact line where the fault is happening in the code, i get only a single line -> memfault _______________________________________________ OSTech http://community.qnx.com/sf/go/post119880 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 06 Sep 2019 14:46:48 GMT http://community.qnx.com/sf/go/post119881 Elad Lahav 2019-09-06T14:46:48Z post119880: Debugging memfault http://community.qnx.com/sf/go/post119880 Hi Quite often i am getting memfault. Like linux do we have any method to know exact line where the fault is happening in the code, i get only a single line -> memfault Fri, 06 Sep 2019 14:38:53 GMT http://community.qnx.com/sf/go/post119880 Sobin Thomas 2019-09-06T14:38:53Z post119861: Re: Sending and receiving data from resource manager http://community.qnx.com/sf/go/post119861 Hello Thomas, > Hi > > I got a question in Resource manager usage > > When we use devctl in the driver to send the data back to the user code ( > client) we use > > struct test* = _DEVCTL_DATA(msg->o); > > // Code to populate the test structure > > if (nbytes == 0) { > return (_RESMGR_ERRNO (EOK)); > } else { > msg -> o.ret_val = 0; > msg -> o.nbytes = nbytes; > return (_RESMGR_PTR (ctp, &msg -> o, sizeof (msg -> o) + nbytes)); > > } > > with the above code we expect the struct test content will be there in the > caller function (client) > > Q1. Do we need to do memset().. memset(&msg->o, 0, sizeof(msg->o)); No. Well, to be defensive, simply add "msg -> o.zero = msg->o.zero2 = 0" > If yes why it is needed. ? As i am not understanding where the test data will be stored > ? In your code you simply use the input buffer (msg->i) as output buffer (msg->o) for the message reply. > > Q2. I am facing a problem where the data is not transfered to the client. How > to check.? The devctl cmds. which received data, need the ..._FROM Flag in their definition, otherwise your buffer will not receive your test struct. If your test struct is of variable length, you can use the o.ret_val member to return the length. > > Q3. When we are passing structure from the Resource manager to the client do > we need to use _DEVCTL_DATA(msg->o) or > _DEVCTL_DATA(msg->i) > You should use msg->o, but in your case it doesn't matter. devctl IN and OUT message header have the same size. -Michael Wed, 04 Sep 2019 11:46:06 GMT http://community.qnx.com/sf/go/post119861 Michael Tasche 2019-09-04T11:46:06Z post119858: Sending and receiving data from resource manager http://community.qnx.com/sf/go/post119858 Hi I got a question in Resource manager usage When we use devctl in the driver to send the data back to the user code ( client) we use struct test* = _DEVCTL_DATA(msg->o); // Code to populate the test structure if (nbytes == 0) { return (_RESMGR_ERRNO (EOK)); } else { msg -> o.ret_val = 0; msg -> o.nbytes = nbytes; return (_RESMGR_PTR (ctp, &msg -> o, sizeof (msg -> o) + nbytes)); } with the above code we expect the struct test content will be there in the caller function (client) Q1. Do we need to do memset().. memset(&msg->o, 0, sizeof(msg->o)); If yes why it is needed. ? As i am not understanding where the test data will be stored ? Q2. I am facing a problem where the data is not transfered to the client. How to check.? Q3. When we are passing structure from the Resource manager to the client do we need to use _DEVCTL_DATA(msg->o) or _DEVCTL_DATA(msg->i) Wed, 04 Sep 2019 06:37:07 GMT http://community.qnx.com/sf/go/post119858 Sobin Thomas 2019-09-04T06:37:07Z post119843: Re: PCI 2.x devices not supported by QNX 7.0 http://community.qnx.com/sf/go/post119843 Hi Mike, yes, the problem are the "old" PCI2.x cards. Please have a look to the different screendumps for QNX 6.5 and QNX 7.0 ... they are attached. Regards Armin > Hi Armin, > > Can you please be more specific as to what problems you are seeing? > > I can assure you that other than our decision to not support Cardbus, there > was no deliberate attempt to restrict the use of any hardware to a specific > specification revision. > Is Cardbus the issue? > > Regards, > Mike Thu, 29 Aug 2019 14:19:53 GMT http://community.qnx.com/sf/go/post119843 Armin Steinhoff(deleted) 2019-08-29T14:19:53Z post119841: Re: Create proc fs to send the arguments to the Driver http://community.qnx.com/sf/go/post119841 Hi Thomas, there is no dedicated procfs, like a Linux Kernel is providing. a) Every qnx process can overtake some area in the qnx name-space. If you want to control your special driver only, your driver could generate a prefix in the name-space. Lets say, your driver already uses the prefix "/dev/myDevice/IO" for normal work, you could additional attach "/dev/myDevice/Debug" and connect the "IO_WRITE"-Entry. So, for example you later simply type "echo debug=42 > /dev/myDevice/IO/Debug" to activate something in your driver. b) Alternatively you could poll a file under "/dev/shmem" from time to time. This file could contain the debug-flags. The simple RAM-Disk "/dev/shmem" is serviced by procnto and is available on every running QNX-system. Regards Michael Thu, 29 Aug 2019 08:03:40 GMT http://community.qnx.com/sf/go/post119841 Michael Tasche 2019-08-29T08:03:40Z post119840: Create proc fs to send the arguments to the Driver http://community.qnx.com/sf/go/post119840 Hi I want to create a procfs entry to send the debug argument to the device driver at run time. Is it possible ? Actually I want to enable the logs at run time. So I am thinking to modify a flag in procfs and poll same in the driver code. Thu, 29 Aug 2019 05:30:50 GMT http://community.qnx.com/sf/go/post119840 Sobin Thomas 2019-08-29T05:30:50Z post119837: Re: PCI 2.x devices not supported by QNX 7.0 http://community.qnx.com/sf/go/post119837 Hi Armin, Can you please be more specific as to what problems you are seeing? I can assure you that other than our decision to not support Cardbus, there was no deliberate attempt to restrict the use of any hardware to a specific specification revision. Is Cardbus the issue? Regards, Mike Tue, 27 Aug 2019 18:58:32 GMT http://community.qnx.com/sf/go/post119837 Michael Kisel 2019-08-27T18:58:32Z post119829: Re: PCI 2.x devices not supported by QNX 7.0 http://community.qnx.com/sf/go/post119829 Absolutely no one said that!! As you probabbly know there are older and newer PCI standards. The issue is here the support of the older PCI 2.x standard. There is a huge installed base in the field of industrial applications. And yes ... PCIe is well supported. It's just the crazy decision not to support PCI 2.x which makes huge problems iin the INDUSTRY. > Who said PCI devices are not supported? > > On Tuesday, 20 August 2019 04:18:13 EDT, Steinhoff Armin wrote: > > > > > > We have customers running thausends PCI 2.x deviices under QNX 6.x . > > > > Why are these devices not supported by QNX 7.0?? > > > > > > Best Regards > > > > > > > > > > > Fri, 23 Aug 2019 14:57:36 GMT http://community.qnx.com/sf/go/post119829 Armin Steinhoff(deleted) 2019-08-23T14:57:36Z post119816: Re: PCI 2.x devices not supported by QNX 7.0 http://community.qnx.com/sf/go/post119816 Who said PCI devices are not supported? On Tuesday, 20 August 2019 04:18:13 EDT, Steinhoff Armin wrote: > > > We have customers running thausends PCI 2.x deviices under QNX 6.x . > > Why are these devices not supported by QNX 7.0?? > > > Best Regards > > > > > Tue, 20 Aug 2019 13:09:51 GMT http://community.qnx.com/sf/go/post119816 Elad Lahav 2019-08-20T13:09:51Z post119814: PCI 2.x devices not supported by QNX 7.0 http://community.qnx.com/sf/go/post119814 We have customers running thausends PCI 2.x deviices under QNX 6.x . Why are these devices not supported by QNX 7.0?? Best Regards Tue, 20 Aug 2019 08:18:13 GMT http://community.qnx.com/sf/go/post119814 Steinhoff Armin(deleted) 2019-08-20T08:18:13Z post119802: Re: Set TOS for outgoing packages http://community.qnx.com/sf/go/post119802 Hi, You need to get the latest io-pkt, libsocket.so, lsm-pf-v4.so (or lsm-pf-v6.so), pfctl. With the latest version, you can set tos using the following PF scrub rule: scrub out on <interface> all set-tos <your_tos> Thu, 08 Aug 2019 13:01:30 GMT http://community.qnx.com/sf/go/post119802 Ted Zhang 2019-08-08T13:01:30Z post119801: Set TOS for outgoing packages http://community.qnx.com/sf/go/post119801 Hey, I want to change the TOS values of all outgoing TCP packages. I tried to do that with the package filter pf. In the pf versions of other operating systems like openBSD is a possibility to set the TOS. This option is not in the pf version of QNX. I am using QNX Neutrino 7.0.0. Are there another possibilities to change the TOS value for all outgoing TCP packages? I know its possible to create a RAW socket to create the IP header manually, but then its necessary to implement the whole handshake procedure themselves. This is an effort we want to prevent for our project. Thu, 08 Aug 2019 03:00:31 GMT http://community.qnx.com/sf/go/post119801 Michael Radzieda 2019-08-08T03:00:31Z post119785: RE: pidin stack analysis http://community.qnx.com/sf/go/post119785 It returns the faulted stack so pretty much the maximum used. ________________________________________ From: Derek Dimech [community-noreply@qnx.com] Sent: Thursday, July 25, 2019 16:19 To: ostech-core_os Subject: pidin stack analysis Does pidin -M '%m' return the instantaneous stack size upon calling the shell command, or the maximum amount of stack that it has used since it was loaded into RAM (high bound watermark)? I am looking to accomplish the latter. _______________________________________________ OSTech http://community.qnx.com/sf/go/post119784 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 25 Jul 2019 15:02:53 GMT http://community.qnx.com/sf/go/post119785 John Kearney 2019-07-25T15:02:53Z post119784: pidin stack analysis http://community.qnx.com/sf/go/post119784 Does pidin -M '%m' return the instantaneous stack size upon calling the shell command, or the maximum amount of stack that it has used since it was loaded into RAM (high bound watermark)? I am looking to accomplish the latter. Thu, 25 Jul 2019 14:19:47 GMT http://community.qnx.com/sf/go/post119784 Derek Dimech 2019-07-25T14:19:47Z post119760: Re: SATA on AM572x - QNX7 http://community.qnx.com/sf/go/post119760 It may or may not be the cause of the issue, it might be *one* of the causes. So I recommend to implement the mentioned workaround and see if it helps. -Al Mon, 17 Jun 2019 08:09:13 GMT http://community.qnx.com/sf/go/post119760 Albrecht Uhlmann 2019-06-17T08:09:13Z post119759: Re: SATA on AM572x - QNX7 http://community.qnx.com/sf/go/post119759 Sorry for the delayed response. I have verified the PINMUX and clock paths. Everything looks in order. Furthermore, I ported Linux on the custom board and the SATA port is recognized as expected. Since the same u-boot is used to load QNX, the above-mentioned step proves that Pinmux in U-Boot and the hardware is good. Moreover, I had a brief look into the errata of AM572x and found that section i818, *************************************************************************************************************************** i818 SATA PHY Reset Required Following SATA PLL Unlock DESCRIPTION If SATA controller is in slumber or partial low-power mode, SATA PHY is in low-power mode, and SATA 1.5 GHz PLL is relocked for any reason, the PHY receiver looses lock. In result the receiver / de-serializer is unable to produce parallel data from a correct serial source, and will not detect the attached SATA drive. WORKAROUND Workaround is to disable and re-enable both analog LDO of the transceiver, using the corresponding SW programmable bits of power control MMR: The CTRL_CORE_PHY_POWER_SATA[21:14] SATA_PWRCTL_CLK_CMD must be set to 0x0 to power down the SATA PHY TX and RX modules. The rest of the workaround sequence is the same as upon initial SATA PHY power-up, and includes setting above bits back to 0x2. ************************************************************************************************************************** In init_sata.c::50 init_sata_phy(), I see that this function was implemented as per TRM, what I don't see is that the i818 workaround implemented. Maybe this is the issue!? Abilash Fri, 14 Jun 2019 19:44:06 GMT http://community.qnx.com/sf/go/post119759 Abilash Janakiraman 2019-06-14T19:44:06Z post119717: Re: Timed Message Send http://community.qnx.com/sf/go/post119717 What are your timeout values? If NULL, the timeout is immediate. Are you checking your MsgSend return value and errorno to ensure you are unblocking for the reason that are thinking that you are unblocking? Thu, 30 May 2019 13:15:36 GMT http://community.qnx.com/sf/go/post119717 Dave Nickerson 2019-05-30T13:15:36Z post119712: Process ability check http://community.qnx.com/sf/go/post119712 Anyone knows how to monitor abilities of already running process? Thu, 23 May 2019 11:46:34 GMT http://community.qnx.com/sf/go/post119712 Krutadnyata Naik 2019-05-23T11:46:34Z post119711: How to create static memory under QNX http://community.qnx.com/sf/go/post119711 Hi QNX, I want to understand how to create static memory under QNX?using smmu? static memory means that all memory allocations are done upfront and dynamic memory allocations during runtime are not allowed. Under QNX, there is some similiar driver like cmem under linux? Thanks, Tao Wed, 22 May 2019 15:10:00 GMT http://community.qnx.com/sf/go/post119711 Tao DING 2019-05-22T15:10:00Z post119708: Can not connect to the QNX target for debugging http://community.qnx.com/sf/go/post119708 Hello QNX, I am now using Momentics under Windows. Windows IP :192.168.14.9 Then I have the QNX running on the target at 192.168.14.11:21 Then the FTP connection was established between Host and Target, can also send files between host and target from both sides. But if I ping from Host : ping 192.168.14.9 working if I ping from Target: ping 192.168.14.11 not working Then I tried to connect the target for debugging, firstly run qconn command on the target Then moentics always says that 192.168.14.11 not connected. Do you have any ideas? Thanks, Tao Tue, 21 May 2019 12:59:55 GMT http://community.qnx.com/sf/go/post119708 Tao DING 2019-05-21T12:59:55Z post119704: Process Call Stack http://community.qnx.com/sf/go/post119704 Hi, We are trying get call stack call by using "bt_get_backtrace()" API when there is a crash and we are able get the call stack but if we enable optimization levels(-O1 or -O2) during compilation, we are unable to get call stack. Can anyone could help us that is there any dependency(or)relation between getting call stack and optimization levels and please help us how to get call stack with optimization is enabled. Thank you in Advance..... Thanks & Regards, Sai Mon, 13 May 2019 09:37:18 GMT http://community.qnx.com/sf/go/post119704 Sai Devasani 2019-05-13T09:37:18Z post119701: Compiler Options with qcc http://community.qnx.com/sf/go/post119701 Hi, Disabling a particular flag with optimization levels(O1, O2, O3) is it will work in qcc/q++? For example: gcc -O2 -fno-align-functions file.c -o executable and gcc -O2 file.c -o executable_2 does above both executables shall work as same or different? Kindly anyone help me in this doubt. Thank you in Advance.... Thanks & Regards, Sai Fri, 10 May 2019 09:54:39 GMT http://community.qnx.com/sf/go/post119701 Sai Devasani 2019-05-10T09:54:39Z post119678: Re: Coredump creation from user defined Signal Handler http://community.qnx.com/sf/go/post119678 > Hi, > > Could you any one suggests me is there any way to create a coredump from user > defined signal handler without using "signal(sig_num_u32, SIG_DFL) and > kill(getpid(), sig_num_u32)". > > Thank you in Advance.... > > Thanks & Regards, > Sai Thu, 25 Apr 2019 13:28:24 GMT http://community.qnx.com/sf/go/post119678 Sai Devasani 2019-04-25T13:28:24Z post119677: Coredump creation from user defined Fignal Handler http://community.qnx.com/sf/go/post119677 Hi, Could you any one suggests me is there any way to create a coredump from user defined signal handler without using "signal(sig_num_u32, SIG_DFL) and kill(getpid(), sig_num_u32)". Thank you in Advance.... Thanks & Regards, Sai Thu, 25 Apr 2019 13:27:53 GMT http://community.qnx.com/sf/go/post119677 Sai Devasani 2019-04-25T13:27:53Z post119676: Re: System freezes for 48 ms. Trace Event Log shows no events. http://community.qnx.com/sf/go/post119676 Maybe faulty hardware, OS is caught in a very tight interrupt loop which prevents the timer interrupt and the scheduler from running. -Al Wed, 24 Apr 2019 12:25:18 GMT http://community.qnx.com/sf/go/post119676 Albrecht Uhlmann 2019-04-24T12:25:18Z post119675: Re: System freezes for 48 ms. Trace Event Log shows no events. http://community.qnx.com/sf/go/post119675 Whatever is happening is outside the control of QNX. Possibly the system is being put back to "16-bir\t real-mode" during which a protected mode o/s cannot receive any interrupts. Wed, 24 Apr 2019 12:22:19 GMT http://community.qnx.com/sf/go/post119675 Dennis Kellly 2019-04-24T12:22:19Z post119674: Re: System freezes for 48 ms. Trace Event Log shows no events. http://community.qnx.com/sf/go/post119674 Yes it is Intel. It does not look like it is periodic unless the period is very long (couple of seconds or longer). I am also wondering why this freeze takes so long. My system has to react on high frequency events within ~10 ms. Your last sentence is right. The system stays where it was before and runs again afterwards. I also had occurrences when only CPU 1 had 100 % and all others 0 % because the according idle threads were running before. Wed, 24 Apr 2019 12:18:07 GMT http://community.qnx.com/sf/go/post119674 Jan Körner 2019-04-24T12:18:07Z post119673: Re: System freezes for 48 ms. Trace Event Log shows no events. http://community.qnx.com/sf/go/post119673 Assuming this is Intel? 1. Could be SMI stealing time from the o/s: https://en.wikipedia.org/wiki/System_Management_Mode 2. Could be (more likely) bios menu sets some sort of USB "compatibility" mode which periodically polls. Note two cores don't run during that time (likely one). The timeline shows two because two cores were running before and after control was taken away from the o/s. Wed, 24 Apr 2019 11:48:04 GMT http://community.qnx.com/sf/go/post119673 Dennis Kellly 2019-04-24T11:48:04Z post119672: System freezes for 48 ms. Trace Event Log shows no events. http://community.qnx.com/sf/go/post119672 Hello, I observed a strange system behavior. The system is a quad core QNX 6.6 system. Main load is on CPU 1 and 2. During automatic testing, it sporadically appears that the whole system freezes for about 48 ms. I could catch that time slot with tracelogger. It shows that the complete system status is hold for 48 ms. No events are logged, no interrupts are coming. The QNX system time read out via SYSPAGE_ENTRY(qtime) does not run further during that time, but the CPU cycles increase. Thus I got a difference between QNX system time and CPU cycles (calculated into time). I attached three pictures of the Trace Event Log: CpuActivity.png shows that CPU 1 and 2 are at 100% while CPU 3 and 4 are at 0 % during the whole time slot. TimelineOverview.png shows an overview of all running processes. There are no entries during the 48 ms time slot. TimelineDetail.png shows the CPU 1 to 4 idle threads and two user threads which are running on CPU 1 and 2. Again there are no events in that time. The two user threads run on relatively low priority (30 and 6). Blocking by priority cannot be the root cause of the freeze. Do you have an idea, what may lead to this behavior? Thanks and regards, Jan Wed, 24 Apr 2019 11:25:30 GMT http://community.qnx.com/sf/go/post119672 Jan Körner 2019-04-24T11:25:30Z post119655: Re: GPIO Interrupts not being caught by QNX interrupt handler on am335x http://community.qnx.com/sf/go/post119655 I solved my problem. The GPIO IRQ numbers are different in QNX, as described in the 2nd reply to this post: http://community.qnx.com/sf/discussion/do/listPosts/projects.core_os/discussion.newcode.topc27325 They are defined in init_intrinfo.c in the BSP. So GPIO port 1 pin 14 is IRQ 814. Thu, 11 Apr 2019 19:22:47 GMT http://community.qnx.com/sf/go/post119655 Matthew Rottinghaus 2019-04-11T19:22:47Z post119654: GPIO Interrupts not being caught by QNX interrupt handler on am335x http://community.qnx.com/sf/go/post119654 I am having an issue with GPIO interrupts in QNX. I have been able to create and handle interrupts from other peripherals in QNX using InterruptAttach, following the documentation, but it does not receive any GPIO interrupts. I have checked that the interrupts are getting unmasked, and the GPIO_IRQSTATUS_RAW interrupt bit is being set, but my code is still not receiving the interrupt. This is in QNX Neutrino 7.0 on a Beaglebone Black. I am trying to get a high level interrupt from GPIO port 1. Does anyone know what might be causing this issue, or where I could find example code of GPIO interrupts in QNX on the Beaglebone Black? Thu, 11 Apr 2019 18:49:38 GMT http://community.qnx.com/sf/go/post119654 Matthew Rottinghaus 2019-04-11T18:49:38Z post119630: Re: Timed Message Send http://community.qnx.com/sf/go/post119630 H iWill Miles, Thank you for the information. I tried using below code but it's not working. On client side if i remove "TimerTimeout()", messsage sending is getting is succeeded and blocked infinitely, but if i keep the same PIcall with 5 sec time, MsgSend() is unblocking immediately. Server side: na = name_attach(NULL, D_Name, 0); MsgReceive(na->chid, &buf, sizeof(buf), NULL); Client side: coid = name_open(D_Name, 0); TimerTimeout(CLOCK_REALTIME , _NTO_TIMEOUT_SEND | _NTO_TIMEOUT_REPLY, &sigeven_st, &timeout, NULL); MsgSend(coid, &snd_buf, sizeof(snd_buf), &rcv_buf, sizeof(rcv_buf)); Thanks Sai Tue, 02 Apr 2019 14:38:48 GMT http://community.qnx.com/sf/go/post119630 Sai Devasani 2019-04-02T14:38:48Z post119629: Re: Timed Message Send http://community.qnx.com/sf/go/post119629 Hi Sai, Take a look at: http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.getting_started/topic/s1_timer_kto.html http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.getting_started/topic/s1_timer_Kernel_timeouts_with_messages.html and http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.getting_started/topic/s1_msg_ntochfunblock.html Good luck, -Will Mon, 01 Apr 2019 17:10:59 GMT http://community.qnx.com/sf/go/post119629 Will Miles 2019-04-01T17:10:59Z post119628: Timed Message Send http://community.qnx.com/sf/go/post119628 Hi, How to unblock msgsend() after certain amount of time, if there is no msgreply(). Could anyone please us to how to do?? Thank you.... In Advance Best regards Sai Mon, 01 Apr 2019 17:03:49 GMT http://community.qnx.com/sf/go/post119628 Sai Devasani 2019-04-01T17:03:49Z post119626: Re: PCI irq request fails http://community.qnx.com/sf/go/post119626 The x86 HW module was recently updated to add support for additional Skylake chipsets. Contact your sales or support representative in order obtain any updates. You will want version 2.1 or later of that module. You can also make use of a hardware config file in order to specify the IRQ for that device. See etc/system/config/pci/pci_hw-template.cfg in your $QNX_TARGET directory On 3/31/19 6:19 AM, John Efstathiades wrote: > Hello, > > I am writing a driver for a PCIe card. I have two identical cards in adjacent PCIe slots in a Dell workstation with a Skylake processor. Both cards are detected and I get back a valid PCI handle from pci_dev_attach() for both cards and valid BARs from pci_device_read_ba(). However, when pci_device_read_irq() is called only one card get an IRQ. The request for the second card fails with error PCI_ERR_IRQ_NOT_AVAIL. > > The cards are requesting legacy INTx IRQs. > > I have attached the system log output showing the messages from the PCI server. > > Is the PCI server doing something wrong, or is there something I need to do before calling pci_device_read_irq()? > > I am using SDP7.0 with the generic x86-64 BSP. > > Regards, > John > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post119625 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Sun, 31 Mar 2019 13:35:00 GMT http://community.qnx.com/sf/go/post119626 Michael Kisel 2019-03-31T13:35:00Z post119625: PCI irq request fails http://community.qnx.com/sf/go/post119625 Hello, I am writing a driver for a PCIe card. I have two identical cards in adjacent PCIe slots in a Dell workstation with a Skylake processor. Both cards are detected and I get back a valid PCI handle from pci_dev_attach() for both cards and valid BARs from pci_device_read_ba(). However, when pci_device_read_irq() is called only one card get an IRQ. The request for the second card fails with error PCI_ERR_IRQ_NOT_AVAIL. The cards are requesting legacy INTx IRQs. I have attached the system log output showing the messages from the PCI server. Is the PCI server doing something wrong, or is there something I need to do before calling pci_device_read_irq()? I am using SDP7.0 with the generic x86-64 BSP. Regards, John Sun, 31 Mar 2019 10:19:06 GMT http://community.qnx.com/sf/go/post119625 John Efstathiades 2019-03-31T10:19:06Z post119610: RE: Pid from Siginfo Structure http://community.qnx.com/sf/go/post119610 try the help docs which describe all this. http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.lib_ref/topic/s/siginfo_t.html ________________________________________ From: Sai Devasani [community-noreply@qnx.com] Sent: Wednesday, March 27, 2019 08:55 To: ostech-core_os Subject: Pid from Siginfo Structure Hi, We are trying to create crash by calling below line in our code, int var = 1/0; Then trying get "pid" from "siginfo_t" structure, but it's giving pid as 8. Can you anyone please help us to get correct pid of crashed process? Thank you in Advance... Thanks & Regards, Sai _______________________________________________ OSTech http://community.qnx.com/sf/go/post119607 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 27 Mar 2019 11:36:33 GMT http://community.qnx.com/sf/go/post119610 John Kearney 2019-03-27T11:36:33Z post119607: Pid from Siginfo Structure http://community.qnx.com/sf/go/post119607 Hi, We are trying to create crash by calling below line in our code, int var = 1/0; Then trying get "pid" from "siginfo_t" structure, but it's giving pid as 8. Can you anyone please help us to get correct pid of crashed process? Thank you in Advance... Thanks & Regards, Sai Wed, 27 Mar 2019 07:55:17 GMT http://community.qnx.com/sf/go/post119607 Sai Devasani 2019-03-27T07:55:17Z post119606: SiginfoStructure Details http://community.qnx.com/sf/go/post119606 Hi, We are trying to collect information about a process from the "siginfo_t" structure when there is a crash and we are having below doubts, can any one help us to clarify those? In siginfo_t structure, 1. What is difference between "si_signo", " __fltno" and "__value" and what these will indicates exactly? 2. What is the difference between "__fltip" and "__addr". Which one will indicates fault address location? Thank you in Advance..... Thanks & Regards, Sai Wed, 27 Mar 2019 07:42:34 GMT http://community.qnx.com/sf/go/post119606 Sai Devasani 2019-03-27T07:42:34Z post119584: Re: About the problem of dlopen crash http://community.qnx.com/sf/go/post119584 My project gets dynamically loaded with dlopen,you can see the code on my post. thanks! kja Sat, 16 Mar 2019 02:14:49 GMT http://community.qnx.com/sf/go/post119584 kuang jinxiang(deleted) 2019-03-16T02:14:49Z post119583: Re: About the problem of dlopen crash http://community.qnx.com/sf/go/post119583 There are two types of shared objects: - One which is linked to at link-time (section NEEDED in the executable) - One which gets dynamically loaded with dlopen() Which type of project did you select? Maybe there is a difference in runtime behaviour. It might be something totally different, though. -Al Fri, 15 Mar 2019 09:38:01 GMT http://community.qnx.com/sf/go/post119583 Albrecht Uhlmann 2019-03-15T09:38:01Z post119582: About the problem of dlopen crash http://community.qnx.com/sf/go/post119582 I used QNX to cross-compile a dynamic library, open it with dlopen, the program crashes directly,When debugging with GDB, it was found that no useful information was provided, only the stack was corrupted. The program is as follows: #include <cstdlib> #include <iostream> #include <dlfcn.h> int main(int argc, char *argv[]) { using std::cout; using std::endl; void *handle = NULL; if((handle = dlopen(argv[1], RTLD_LAZY | RTLD_GLOBAL)) == NULL) { cout <<"dlopen" << argv[1] << "error- " << dlerror() << endl; exit(-1); } cout <<"dlopen" << argv[1] << "ok" << endl; return 0; } Run the command :"test libplanning_component.so". The information is as follows: libs: load_object: attempt load of /proc/boot/libstringsa64.so libs: /proc/boot/libstringsa64.so: found; real path:/proc/boot/libstringsa64.so.1 libs: load_elf: Shared library base: 0x78000000 libs: load_elf: libstringsa64.so relro segment is now lazy mapping; 78011000-78012000 libs: load_elf: loaded lib at addr 78000000(text) 78011dd0(data) libs: object /proc/boot/libstringsa64.so loaded; real soname: libstringsa64.so.1 loaded from: /proc/boot/libstringsa64.so.1 libs: load_object: attempt load of libc++.so.1 libs: /lib/libc++.so.1: found; real path:/lib/libc++.so.1 libs: load_elf: Shared library base: 0x78013000 libs: load_elf: libc++.so.1 relro segment is now lazy mapping; 780f7000-780ff000 libs: load_elf: loaded lib at addr 78013000(text) 780f78a0(data) libs: object libc++.so.1 loaded; real soname: libc++.so.1 loaded from: /lib/libc++.so.1 libs: load_object: attempt load of libm.so.3 libs: /proc/boot/libm.so.3: found; real path:/proc/boot/libm.so.3 libs: load_elf: Shared library base: 0x78102000 libs: load_elf: libm.so.3 relro segment is now lazy mapping; 7814a000-7814b000 libs: load_elf: loaded lib at addr 78102000(text) 7814a8b0(data) libs: object libm.so.3 loaded; real soname: libm.so.3 loaded from: /proc/boot/libm.so.3 libs: init: libc.so.4 obj->refcount: 1 libs: init: libm.so.3 obj->refcount: 1 libs: init: libc++.so.1 obj->refcount: 1 libs: init: libstringsa64.so.1 obj->refcount: 1 libs: dlopen("libplanning_component.so",257) Mode: LAZY GLOBAL libs: Neither RTLD_GROUP nor RTLD_WORLD specified, assuming RTLD_GROUP | RTLD_WORLD libs: load_object: attempt load of libplanning_component.so libs: libplanning_component.so: found; real path:/apollo/libplanning_component.so libs: load_elf: Shared library base: 0x7814c000 libs: load_elf: libplanning_component.so relro segment is now lazy mapping; 783b2000-783bb000 libs: load_elf: loaded lib at addr 7814c000(text) 783b2408(data) Process 876567 (testdlopen) terminated SIGSEGV code=1 fltno=11 ip=0000000001056bf4(/usr/lib/ldqnx-64.so.2@dlopen+0x0000000000001834) mapaddr=0000000000056bf4. ref=b400108c7c184c00 Memory fault (core dumped) Any help is much appreciated Thanks, kja Fri, 15 Mar 2019 09:27:13 GMT http://community.qnx.com/sf/go/post119582 kuang jinxiang(deleted) 2019-03-15T09:27:13Z post119581: sem_open function initial value problem http://community.qnx.com/sf/go/post119581 When I use sem_open open a named semaphore,like mysem = sem_open("/temp_sem",O_CREAT,S_IRWXU,0),but when I called sem_getvalue(mysem, &value) ,the value got is not zero,why? Thanks for your help! Thu, 14 Mar 2019 15:42:30 GMT http://community.qnx.com/sf/go/post119581 sun monkey(deleted) 2019-03-14T15:42:30Z post119577: Re: Can QDB meet the requirements of ISO 26262. http://community.qnx.com/sf/go/post119577 Edition 1 of ISO 26262 was published in 2011 and so it's been around for a long time and the QNX OS is certified to ISO 26262 at ASIL D. Version 2 appeared at the end of 2018. I don't know of any databases that have been certified in accordance with ISO 26262 (that doesn't mean that there aren't any). Remember that a system containing uncertified components may still be certified. Tue, 12 Mar 2019 15:53:18 GMT http://community.qnx.com/sf/go/post119577 Chris Hobbs 2019-03-12T15:53:18Z post119576: Re: Can QDB meet the requirements of ISO 26262. http://community.qnx.com/sf/go/post119576 Since QDB uses SQLite as a backend, I would argue that this will impose the same issues than with using SQLite raw. A search on ISO 26262 compliant databases doesn't give a lot of hits, I guess that the standard is so new that you won't find a lot of mature products that have been developed to this standard simply because the standard wasn't there. Whatever product you select, you will probably need to do an evaluation yourself, and will prpbably need the manufacturers input to this end. There are several companies out there that specialize in embedded database development. ITTIA comes to my mind, but there may be others. You could also try to contact the company behind SQLite to see what comes form their end. Regards, Albrecht Tue, 12 Mar 2019 15:45:22 GMT http://community.qnx.com/sf/go/post119576 Albrecht Uhlmann 2019-03-12T15:45:22Z post119575: Re: Memory fault when inserting output for an std::basic_ostream instantiation http://community.qnx.com/sf/go/post119575 Solved by initializing the internal state of the stream: https://en.cppreference.com/w/cpp/io/basic_ios/init Tue, 12 Mar 2019 08:01:19 GMT http://community.qnx.com/sf/go/post119575 Ilyas Hamadouche 2019-03-12T08:01:19Z post119574: Can QDB meet the requirements of ISO 26262. http://community.qnx.com/sf/go/post119574 Our project want use Sqlite to store HDMap, but our product must meet ASIL B. Can we use QDB intead? Mon, 11 Mar 2019 06:57:38 GMT http://community.qnx.com/sf/go/post119574 Fei Peng 2019-03-11T06:57:38Z post119572: RE: how to implement command "cd" http://community.qnx.com/sf/go/post119572 This is not a QNX question. Just call chdir() in your porgram. --Elad ________________________________________ From: mike scott [community-noreply@qnx.com] Sent: March-08-19 1:07 AM To: ostech-core_os Subject: Re: how to implement command "cd" Hi Michael Schuster, Thank you for the quick reply. Then is there anyway I can bring the shell environment into this QT program, in which then I am able to use "cd" to change directories? Please advise, thanks in advance Mike _______________________________________________ OSTech http://community.qnx.com/sf/go/post119570 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 08 Mar 2019 11:31:45 GMT http://community.qnx.com/sf/go/post119572 Elad Lahav 2019-03-08T11:31:45Z post119570: Re: how to implement command "cd" http://community.qnx.com/sf/go/post119570 Hi Michael Schuster, Thank you for the quick reply. Then is there anyway I can bring the shell environment into this QT program, in which then I am able to use "cd" to change directories? Please advise, thanks in advance Mike Fri, 08 Mar 2019 06:07:50 GMT http://community.qnx.com/sf/go/post119570 mike scott 2019-03-08T06:07:50Z post119569: Re: how to implement command "cd" http://community.qnx.com/sf/go/post119569 ... or a builtin of whatever tool you're building. look up 'chdir'. On Fri, 2019-03-08 at 06:59 +0100, Michael Schuster wrote: 'cd' is a shell builtin. think about it: "cd" changes the shell's current (working) directory. Since every process has its own current directory, it'd be useless if it were a seperate binary, as it would only change its own directory, not that of the calling shell. HTH On Fri, 2019-03-08 at 00:56 -0500, mike scott wrote: Hi QNX, qnx sdp 6.6, BSP_ti-am335x-beaglebone_br-660_be-660_SVN797070_JBN574.zip beaglebone black Rev. C QT 5.3.1 I implemented a QT program similar to https://evileg.com/en/post/261/ input filesystem command such as "ls", which will list the files under current directory. and "pwd" will show the current directory path. However, I am not able to change directory with command "cd". "ls" / "pwd" and lots of other commands are available @ /opt/qnx660/target/qnx6/armle-v7/bin, however there is no "cd". Please advise, thanks in advance. Mike _______________________________________________ OSTech http://community.qnx.com/sf/go/post119567 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com<mailto:ostech-core_os-unsubscribe@community.qnx.com> Fri, 08 Mar 2019 06:05:42 GMT http://community.qnx.com/sf/go/post119569 Michael Schuster 2019-03-08T06:05:42Z post119568: Re: how to implement command "cd" http://community.qnx.com/sf/go/post119568 'cd' is a shell builtin. think about it: "cd" changes the shell's current (working) directory. Since every process has its own current directory, it'd be useless if it were a seperate binary, as it would only change its own directory, not that of the calling shell. HTH On Fri, 2019-03-08 at 00:56 -0500, mike scott wrote: Hi QNX, qnx sdp 6.6, BSP_ti-am335x-beaglebone_br-660_be-660_SVN797070_JBN574.zip beaglebone black Rev. C QT 5.3.1 I implemented a QT program similar to https://evileg.com/en/post/261/ input filesystem command such as "ls", which will list the files under current directory. and "pwd" will show the current directory path. However, I am not able to change directory with command "cd". "ls" / "pwd" and lots of other commands are available @ /opt/qnx660/target/qnx6/armle-v7/bin, however there is no "cd". Please advise, thanks in advance. Mike _______________________________________________ OSTech http://community.qnx.com/sf/go/post119567 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com<mailto:ostech-core_os-unsubscribe@community.qnx.com> Fri, 08 Mar 2019 05:59:47 GMT http://community.qnx.com/sf/go/post119568 Michael Schuster 2019-03-08T05:59:47Z post119567: how to implement command "cd" http://community.qnx.com/sf/go/post119567 Hi QNX, qnx sdp 6.6, BSP_ti-am335x-beaglebone_br-660_be-660_SVN797070_JBN574.zip beaglebone black Rev. C QT 5.3.1 I implemented a QT program similar to https://evileg.com/en/post/261/ input filesystem command such as "ls", which will list the files under current directory. and "pwd" will show the current directory path. However, I am not able to change directory with command "cd". "ls" / "pwd" and lots of other commands are available @ /opt/qnx660/target/qnx6/armle-v7/bin, however there is no "cd". Please advise, thanks in advance. Mike Fri, 08 Mar 2019 05:56:36 GMT http://community.qnx.com/sf/go/post119567 mike scott 2019-03-08T05:56:36Z post119566: Memory fault when inserting output for an std::basic_ostream instantiation http://community.qnx.com/sf/go/post119566 I have the following example: #include <iostream> #include <string> #include <sstream> #include <fstream> #include <ostream> class File_ostream final : public std::basic_ostream<char, std::char_traits<char>> { }; int main() { const std::string input_file{"file_tests/test.txt.gz"}; std::ifstream ifs{input_file, std::ios_base::in | std::ios_base::binary}; File_ostream file_os{}; file_os << ifs.rdbuf(); // Memory fault (core dumped) } The program always crashes when inserting output to file_os and creates a core dump. Do you have any explanation? hint? Thu, 07 Mar 2019 13:41:49 GMT http://community.qnx.com/sf/go/post119566 Ilyas Hamadouche 2019-03-07T13:41:49Z post119556: Re: RE: RE: mmap_device_io not functioning http://community.qnx.com/sf/go/post119556 problem solved on the previous post http://community.qnx.com/sf/discussion/do/listPosts/projects.core_os/discussion.newcode.topc27488 ThreadCtl(_NTO_TCTL_IO_PRIV, 0); Mike Sun, 03 Mar 2019 01:41:56 GMT http://community.qnx.com/sf/go/post119556 mike scott 2019-03-03T01:41:56Z post119533: Re: RE: mq_send() returns 0 but Trace Event Log shows Error http://community.qnx.com/sf/go/post119533 Hello, I think, I know the cause of the orange arrow. I played around with little test apps and saw that this arrow always appears, when no receiver is waiting with mq_receive() on a sent message. This is actually no real error, but it would be nice to be informed when my communication partner is gone and thus my message is not delivered. Wed, 20 Feb 2019 13:55:19 GMT http://community.qnx.com/sf/go/post119533 Jan Körner 2019-02-20T13:55:19Z post119526: Re: RE: mq_send() returns 0 but Trace Event Log shows Error http://community.qnx.com/sf/go/post119526 Hello Jan, I would try to investigate why process A does not terminate properly. Because the process hanging around as zombie might cause a series of io_close events to be generated. Actually, if all threads of a process are reported as DEAD in pidin I cannot imagine a mechanism why the process should not be removed. MAybe there is a parent/child relationship between process A and some other program? Please tell us, how do you launch processes A and B? Regards, Albrecht Mon, 18 Feb 2019 16:16:40 GMT http://community.qnx.com/sf/go/post119526 Albrecht Uhlmann 2019-02-18T16:16:40Z post119519: RE: RE: mmap_device_io not functioning http://community.qnx.com/sf/go/post119519 This is a non QNX specific question, you need to refer to the chipset specific documentation/forums. I just mentions core files in passing, mainly to point out that your program didn't crash. As such everything on the os side seems to be ok. ________________________________________ From: mike scott [community-noreply@qnx.com] Sent: Thursday, February 14, 2019 12:46 To: ostech-core_os Subject: Re: RE: mmap_device_io not functioning Hi John, Running my program did not incur "SIGSEGV ACCERR" or any other warning/error. Actually I just extract this piece of code from a large program, which is able to complete and function very well. Please advise any QNX document to elaborate "core file", or chipset locked situation etc. Thanks in advance Mike _______________________________________________ OSTech http://community.qnx.com/sf/go/post119518 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 14 Feb 2019 11:52:17 GMT http://community.qnx.com/sf/go/post119519 John Kearney 2019-02-14T11:52:17Z post119518: Re: RE: mmap_device_io not functioning http://community.qnx.com/sf/go/post119518 Hi John, Running my program did not incur "SIGSEGV ACCERR" or any other warning/error. Actually I just extract this piece of code from a large program, which is able to complete and function very well. Please advise any QNX document to elaborate "core file", or chipset locked situation etc. Thanks in advance Mike Thu, 14 Feb 2019 11:46:57 GMT http://community.qnx.com/sf/go/post119518 mike scott 2019-02-14T11:46:57Z post119517: RE: mmap_device_io not functioning http://community.qnx.com/sf/go/post119517 If mmap_device_io wasn't working you would be getting a core file, and be unable to read the value. This is more likely being caused by the chipset being locked, in some way, or that being a read only register or some such. If it wasn't mapped correctly for write access you would expect to see a SIGSEGV ACCERR. Cheers John ________________________________________ From: mike scott [community-noreply@qnx.com] Sent: Thursday, February 14, 2019 04:02 To: ostech-core_os Subject: mmap_device_io not functioning Hi QNX, qnx sdp 6.6, BSP_ti-am335x-beaglebone_br-660_be-660_SVN797070_JBN574.zip beaglebone black Rev. C I am not able to modify register value through mmap_device_io, which always readback as the pre-setted value defined in BSP. #include <errno.h> #include <stdio.h> #include <stddef.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/mman.h> #include <hw/inout.h> #include <arm/am335x.h> #include <sys/iofunc.h> #include <sys/dispatch.h> #define conf_mcasp0_aclkx 0x0990 int main(int argc, char *argv[]) { uintptr_t mode_base; ThreadCtl(_NTO_TCTL_IO, 0); mode_base = mmap_device_io(0x2000, AM335X_CTRL_BASE); out32(mode_base + conf_mcasp0_aclkx, 0x37); sleep(2); printf("conf_mcasp0_aclkx = %x\n", in32(mode_base + conf_mcasp0_aclkx)); munmap_device_io(mode_base, 0x2000); return 1; } program outputs: "conf_mcasp0_aclkx = 23" which is exactly that conf_mcasp0_aclkx was initialized in init_pinmux.c as 0x23. I would like to change it to 0x37. Please help, thanks in advance Mike _______________________________________________ OSTech http://community.qnx.com/sf/go/post119515 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 14 Feb 2019 10:35:41 GMT http://community.qnx.com/sf/go/post119517 John Kearney 2019-02-14T10:35:41Z post119516: Re: RE: mq_send() returns 0 but Trace Event Log shows Error http://community.qnx.com/sf/go/post119516 My setup is as follows: Two multi-threaded processes (e.g. A and B) communicate between each other via mqueue using one of their threads. When process A is terminated from outside (I see the "Dead" entry of every single thread of process A incl.the thread responsible for mqueue access), the ping-pong between process B and mqueue starts and never stops until I kill both processes A and B via SIGKILL. I wrote a little supervision program, which checks the lock of the system and then kills both processes A and B. Thu, 14 Feb 2019 07:14:07 GMT http://community.qnx.com/sf/go/post119516 Jan Körner 2019-02-14T07:14:07Z post119515: mmap_device_io not functioning http://community.qnx.com/sf/go/post119515 Hi QNX, qnx sdp 6.6, BSP_ti-am335x-beaglebone_br-660_be-660_SVN797070_JBN574.zip beaglebone black Rev. C I am not able to modify register value through mmap_device_io, which always readback as the pre-setted value defined in BSP. #include <errno.h> #include <stdio.h> #include <stddef.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/mman.h> #include <hw/inout.h> #include <arm/am335x.h> #include <sys/iofunc.h> #include <sys/dispatch.h> #define conf_mcasp0_aclkx 0x0990 int main(int argc, char *argv[]) { uintptr_t mode_base; ThreadCtl(_NTO_TCTL_IO, 0); mode_base = mmap_device_io(0x2000, AM335X_CTRL_BASE); out32(mode_base + conf_mcasp0_aclkx, 0x37); sleep(2); printf("conf_mcasp0_aclkx = %x\n", in32(mode_base + conf_mcasp0_aclkx)); munmap_device_io(mode_base, 0x2000); return 1; } program outputs: "conf_mcasp0_aclkx = 23" which is exactly that conf_mcasp0_aclkx was initialized in init_pinmux.c as 0x23. I would like to change it to 0x37. Please help, thanks in advance Mike Thu, 14 Feb 2019 03:02:46 GMT http://community.qnx.com/sf/go/post119515 mike scott 2019-02-14T03:02:46Z post119511: Re: RE: mq_send() returns 0 but Trace Event Log shows Error http://community.qnx.com/sf/go/post119511 So the interesting question is: Why is close_ocb being called? Jan, is your program multi-threaded and some other thread is closing the mqueue? Or are processes being spawbed and filedescriptors dup() ed and then closed? Under which conditions does this behaviour occur? Can you reproduce it? Can you describe the setup (e.g. configuration of the particular mqueue, how many sending clients, how many reading clients)? Regards, Al Wed, 13 Feb 2019 16:07:09 GMT http://community.qnx.com/sf/go/post119511 Albrecht Uhlmann 2019-02-13T16:07:09Z post119509: RE: mq_send() returns 0 but Trace Event Log shows Error http://community.qnx.com/sf/go/post119509 This is just how the code is written. When the mqueue resource manager handles the close_ocb() callback it replies by calling MsgError(rcvid, EOK). I have no idea why it does that instead of calling MsgReply(rcvid, EOK, NULL, 0), but that is how the code has been since 2001 (according to the revision history). --Elad ________________________________________ From: Albrecht Uhlmann [community-noreply@qnx.com] Sent: February-13-19 8:10 AM To: ostech-core_os Subject: Re: mq_send() returns 0 but Trace Event Log shows Error "MsgError Exit, ret_val 0 " I think that just means that the function call MsgError() inside the mqueue server returned 0, meaning success, and the client woke up. Maybe if you use WIDE events when logging, it will tell you the value that it placed into the "status" parameter of MsgError(). Regards, Al _______________________________________________ OSTech http://community.qnx.com/sf/go/post119508 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 13 Feb 2019 13:43:36 GMT http://community.qnx.com/sf/go/post119509 Elad Lahav 2019-02-13T13:43:36Z post119508: Re: mq_send() returns 0 but Trace Event Log shows Error http://community.qnx.com/sf/go/post119508 "MsgError Exit, ret_val 0 " I think that just means that the function call MsgError() inside the mqueue server returned 0, meaning success, and the client woke up. Maybe if you use WIDE events when logging, it will tell you the value that it placed into the "status" parameter of MsgError(). Regards, Al Wed, 13 Feb 2019 13:10:43 GMT http://community.qnx.com/sf/go/post119508 Albrecht Uhlmann 2019-02-13T13:10:43Z post119507: Re: mq_send() returns 0 but Trace Event Log shows Error http://community.qnx.com/sf/go/post119507 I found another point in the Trace Event Log: Event, Time, Owner, Type, Data 2136099, 17s 424ms 445us, myProcess Thread 1, MsgSendv Enter, coid 0x6 msg0 0x100102 function write() [...] 2136105, 17s 424ms 448us, mqueue Thread 1, MsgError Enter, rcvid 0x20014 err 0 2136106, 17s 424ms 449us, mqueue Thread 1, Error, tid 3 pid 1179681 process myProcess 2136108, 17s 424ms 449us, mqueue Thread 1, MsgError Exit, ret_val 0 [...] 2136112, 17s 424ms 450us, myProcess Thread 1, MsgSendv Exit, status 0 rmsg 0x0 This is the mentioned error reply. It says "err 0", which is no error and thus I see EOK on return. Wed, 13 Feb 2019 13:00:12 GMT http://community.qnx.com/sf/go/post119507 Jan Körner 2019-02-13T13:00:12Z post119502: Re: mq_send() returns 0 but Trace Event Log shows Error http://community.qnx.com/sf/go/post119502 Hello, I am using mqueue and QNX 6.6.0 2017/08/18-14:22:25EDT. Regards, Jan Tue, 12 Feb 2019 13:34:11 GMT http://community.qnx.com/sf/go/post119502 Jan Körner 2019-02-12T13:34:11Z post119501: Re: mq_send() returns 0 but Trace Event Log shows Error http://community.qnx.com/sf/go/post119501 Which version of the POSIX Messge Queues are you useing: mqueue or mq? (pidin arg will tell you). Which QNX version are you using? One would need to have a look into the code to see how the implementation of mq_send() utilizes MsgSend(). I would expect that the return value of MsgSend() is directly passed back as a return value of mq_send() but I don't know because I don't have the code. In any case, if a server process calls MsgError() with status set to 0, then the return value of the original MsgSend() call will be -1 and errno set to 0. So after returning from mq_send() it is essential to check the return value of the function, not errno alone. Regards, Albrecht Tue, 12 Feb 2019 13:14:19 GMT http://community.qnx.com/sf/go/post119501 Albrecht Uhlmann 2019-02-12T13:14:19Z post119500: mq_send() returns 0 but Trace Event Log shows Error http://community.qnx.com/sf/go/post119500 Hello, under certain circumstances, my system runs into a never ending message ping-pong between mqueue and another process. I was able to break this ping-pong and got a kernel event log. It shows, that a Send Message from my process is answered with Error from mqueue (orange IPC arrow in timeline view). The code of my process would handle a return value of -1 of mq_send(), but it seems to return 0. I read the description of Communication event Error. It says, that the client (mqueue) calls MsgError() in that case. The description of MsgError() says, that it sets errno according to the given error parameter and returns MsgSend() with return value -1. Only if the given error parameter is 0, MsgSend() will return 0 (EOK). So I assume, that MsgError() was called with error = 0 within mqueue. How can I now catch that error in my process? Tue, 12 Feb 2019 12:51:46 GMT http://community.qnx.com/sf/go/post119500 Jan Körner 2019-02-12T12:51:46Z post119499: Re: SATA on AM572x - QNX7 http://community.qnx.com/sf/go/post119499 Are you using u-boot to launch QNX, or are you just boot using IPL + IFS supplied in the BSP? In both cases, what I would do is check if the pinmux settings are correct, and if all clocks that make the path to the S-ATA controller are turned on, and if they run at the speed that the driver expects. Regards, Albrecht Mon, 11 Feb 2019 15:07:31 GMT http://community.qnx.com/sf/go/post119499 Albrecht Uhlmann 2019-02-11T15:07:31Z post119497: Re: SATA on AM572x - QNX7 http://community.qnx.com/sf/go/post119497 > Which board are you using? > AJR: Custom Board designed based on Beaglebone - x15. > Which BSP did you use as a base? > AJR: BSP for DRA74x EVM from QNX Software Center - STABLE (7.0.0 GA 201702151736 ) ( QNX Neutrino 7.0 on the Texas Instruments AM572x EVM Board) As an experiment, I ported the BSP on to BeagleBoard x15 with e-SATA connector. The QNX driver fails to recognize the SATA device, while U-Boot is able to detect the External Hard disk. AJR Fri, 08 Feb 2019 16:37:46 GMT http://community.qnx.com/sf/go/post119497 Abilash Janakiraman 2019-02-08T16:37:46Z post119494: Re: SATA on AM572x - QNX7 http://community.qnx.com/sf/go/post119494 Which board are you using? Which BSP did you use as a base? -Al Fri, 08 Feb 2019 12:35:28 GMT http://community.qnx.com/sf/go/post119494 Albrecht Uhlmann 2019-02-08T12:35:28Z post119491: SATA on AM572x - QNX7 http://community.qnx.com/sf/go/post119491 Hi, I have a CFast connecter in SATA Controller of AM572x. I am using QNX 7. Enabling the driver with the default parameters as given in the startup script devb-ahci-omap5 ahci ioport=0x4a140000,irq=86 blk cache=2M cam cache During startup, driver reports Path=0 - AHCI (generic) but usable No logical devices are found under /dev/ Meanwhile, Uboot is able to read the CFast card and reports the following. SCSI: Target spinup took 0 ms. AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst scanning bus for devices... Device 0: (0:0) Vendor: ATA Prod.: Delkin Devices B Rev: 1308 Type: Hard Disk Capacity: 3913.8 MB = 3.8 GB (8015616 x 512) Found 1 device(s). Am I missing any initialization parameters? AJR Thu, 07 Feb 2019 21:14:42 GMT http://community.qnx.com/sf/go/post119491 Abilash Janakiraman 2019-02-07T21:14:42Z post119458: Re: std::cout doesn't print letters after \n http://community.qnx.com/sf/go/post119458 Hi Elad, Thanks for the information. Yes, I am using QNX 7.0.3. BR, Ilyas Tue, 29 Jan 2019 16:14:28 GMT http://community.qnx.com/sf/go/post119458 Ilyas Hamadouche 2019-01-29T16:14:28Z post119457: Re: std::cout doesn't print letters after \n http://community.qnx.com/sf/go/post119457 What version of QNX are you using? There is a known bug in the handling of line-buffered stream output in 7.0.3 only, that will be fixed in 7.0.4. --Elad On Tue, 2019-01-29 at 09:43 -0500, Ilyas Hamadouche wrote: > Thank you Michael for the reply. > > I tried flushing but without result. ( Surprisingly std::cerr works > just fine even without flush) > > Of course there are other ways to print, but the point here is that > if this is a bug, we want to report to QNX. > > BR, > Ilyas > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post119456 > To cancel your subscription to this discussion, please e-mail ostech- > core_os-unsubscribe@community.qnx.com Tue, 29 Jan 2019 15:43:34 GMT http://community.qnx.com/sf/go/post119457 Elad Lahav 2019-01-29T15:43:34Z post119456: Re: std::cout doesn't print letters after \n http://community.qnx.com/sf/go/post119456 Thank you Michael for the reply. I tried flushing but without result. ( Surprisingly std::cerr works just fine even without flush) Of course there are other ways to print, but the point here is that if this is a bug, we want to report to QNX. BR, Ilyas Tue, 29 Jan 2019 14:43:47 GMT http://community.qnx.com/sf/go/post119456 Ilyas Hamadouche 2019-01-29T14:43:47Z post119455: Re: std::cout doesn't print letters after \n http://community.qnx.com/sf/go/post119455 at a guess, it's not flushing stdout because Item3 isn't followed by a '\n'. Try adding one and see whether that helps. (I'm also guessing that you're showing just an excerpt of the actual code that's proving troublesome .. ) regards .. On Tue, 2019-01-29 at 09:26 -0500, Ilyas Hamadouche wrote: The following code always outputs: Item1 Item2 Code: #include <iostream> #include <string> int main() { std::string string_test{"Item1\nItem2\nItem3"}; std::cout << string_test; return 0; } Any explanations? Is this a bug? _______________________________________________ OSTech http://community.qnx.com/sf/go/post119454 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com<mailto:ostech-core_os-unsubscribe@community.qnx.com> Tue, 29 Jan 2019 14:29:08 GMT http://community.qnx.com/sf/go/post119455 Michael Schuster 2019-01-29T14:29:08Z post119454: std::cout doesn't print letters after \n http://community.qnx.com/sf/go/post119454 The following code always outputs: Item1 Item2 Code: #include <iostream> #include <string> int main() { std::string string_test{"Item1\nItem2\nItem3"}; std::cout << string_test; return 0; } Any explanations? Is this a bug? Tue, 29 Jan 2019 14:26:52 GMT http://community.qnx.com/sf/go/post119454 Ilyas Hamadouche 2019-01-29T14:26:52Z post119449: Re: qnx 6.6 appsmedia on beaglebone black http://community.qnx.com/sf/go/post119449 following 《QNX SDK for Apps and Media 1.1 Getting Started》, I am able to building a target image of beaglebonedemo. Thanks for well documented. Mike Mon, 28 Jan 2019 05:44:01 GMT http://community.qnx.com/sf/go/post119449 mike scott 2019-01-28T05:44:01Z post119444: Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX http://community.qnx.com/sf/go/post119444 Hi Albrecht, I wrote one a couple of years ago when I was looking in to porting the Linux ptpd. I threw the source code up on https://gitlab.com/wmiles/npshim ("Non-POSIX shims"); it's kind of lame but seemed to work for my limited test cases. -Will Wed, 23 Jan 2019 18:06:55 GMT http://community.qnx.com/sf/go/post119444 Will Miles 2019-01-23T18:06:55Z post119443: Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX http://community.qnx.com/sf/go/post119443 I understand, and to some extent agree. The problem with this approach is that eventually no one writes native QNX code, and then everyone complains about performance.  Yes, it is trivial to implement timerfd() with a resource manager, but now instead of a pulse being delivered by the kernel to the target process you have the pulse delivered to the resource manager, which then does MsgDeliverEvent() to the target process. Multiple kernel entries, multiple address space switches. It works, but now well. --Elad On Wed, 2019-01-23 at 11:37 -0500, Albrecht Uhlmann wrote: > To my understanding, the most important use case for wanting to have > timerfd() and friends available under QNX is porting existing Linux > code. > What Elad says is technically correct but it implies that this code > being reworked to be run under QNX, which is often not desired becaus > it requires comprehensive QNX native knowledge (setting up channels > and connections etc.). It would be much nicer to simply have the > Linux APIs available. We were actually considering writing a resource > manager which provides timerfd() and eventfd() APIs. For timers in > the 5...10ms range the performance should be sufficient. If someone > is interested we could setup a project. > > Regards, > Albrecht > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post119442 > To cancel your subscription to this discussion, please e-mail ostech- > core_os-unsubscribe@community.qnx.com Wed, 23 Jan 2019 17:16:17 GMT http://community.qnx.com/sf/go/post119443 Elad Lahav 2019-01-23T17:16:17Z post119442: Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX http://community.qnx.com/sf/go/post119442 To my understanding, the most important use case for wanting to have timerfd() and friends available under QNX is porting existing Linux code. What Elad says is technically correct but it implies that this code being reworked to be run under QNX, which is often not desired becaus it requires comprehensive QNX native knowledge (setting up channels and connections etc.). It would be much nicer to simply have the Linux APIs available. We were actually considering writing a resource manager which provides timerfd() and eventfd() APIs. For timers in the 5...10ms range the performance should be sufficient. If someone is interested we could setup a project. Regards, Albrecht Wed, 23 Jan 2019 16:37:58 GMT http://community.qnx.com/sf/go/post119442 Albrecht Uhlmann 2019-01-23T16:37:58Z post119441: Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX http://community.qnx.com/sf/go/post119441 ionotify() And you don't need timerfd*() in QNX. If you write your program around an event loop with a MsgReceive() call then you can have all events delivered as pulses, both from file descriptors (with ionotify()) and timers. timerfd() solves a problem that doesn't exist in QNX. --Elad On Wed, 2019-01-23 at 09:12 -0500, Mohan Kumar wrote: > Hi, > > Even I am blocked with the same question. Please suggest alternative > API's for epoll_create(), epoll_ctl(), epoll_wait() > > In addition I also need alternate API's for timerfd_settime(), > Eventfd(), dgram_send(), dgram_recv() in QNX. > > Thanks > MOhan > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post119439 > To cancel your subscription to this discussion, please e-mail ostech- > core_os-unsubscribe@community.qnx.com Wed, 23 Jan 2019 14:35:42 GMT http://community.qnx.com/sf/go/post119441 Elad Lahav 2019-01-23T14:35:42Z post119439: Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX http://community.qnx.com/sf/go/post119439 Hi, Even I am blocked with the same question. Please suggest alternative API's for epoll_create(), epoll_ctl(), epoll_wait() In addition I also need alternate API's for timerfd_settime(), Eventfd(), dgram_send(), dgram_recv() in QNX. Thanks MOhan Wed, 23 Jan 2019 14:12:54 GMT http://community.qnx.com/sf/go/post119439 Mohan Kumar 2019-01-23T14:12:54Z post119424: qnx 6.6 appsmedia on beaglebone black http://community.qnx.com/sf/go/post119424 Hi QNX, qnx sdp 6.6, qnx sdk for apps and media 1.1 release, BSP_ti-am335x-beaglebone_br-660_be-660_SVN797070_JBN574.zip beaglebonedemo.ext.anm11.258.150325_2017 About_the_QNX_SDK_for_Apps_and_Media.pdf I am working on beaglebone black with qnx 6.6 + sdk for apps and media. According to 《About_the_QNX_SDK_for_Apps_and_Media.pdf》 page 11, quote, "You begin by downloading a BSP from the QNX website. Among other things, the BSP should include three buildfiles: • a QNX SDP 6.6 BSP-specific buildfile • a board-specific buildfile for Apps and Media (appsmedia-sample-board.build) • a common buildfile for Apps and Media (appsmedia-sample-common.build)" However, there is only one build file in the BSP_ti-am335x-beaglebone_br-660.zip , i.e., beaglebone.build, while missing appsmedia-sample-beaglebone.build and appsmedia-sample-common.build. On the other hands, I have tried beaglebonedemo.ext.anm11.258.150325_2017, which actually provides full support of appsmedia package. I am wondering whether QNX experts could provide appsmedia-sample-beaglebone.build and appsmedia-sample-common.build, or provide the building script for beaglebonedemo to facilitate my project. Please advise, thanks in advance. Mike Mon, 21 Jan 2019 03:01:56 GMT http://community.qnx.com/sf/go/post119424 mike scott 2019-01-21T03:01:56Z post119421: Re: How read Register Values http://community.qnx.com/sf/go/post119421 Hii Michael Schuster , We are using QNX7.0 version. Just now i gone through the denverton data sheet and they were saying that those register addresses are [PWRMBASE] + 124h, [PWRMBASE] + 128h and [PWRMBASE] + 12Ch. Here am confusing that how can we proceed further from this information. Thanks & Regards Sai Thu, 17 Jan 2019 06:50:10 GMT http://community.qnx.com/sf/go/post119421 Sai Devasani 2019-01-17T06:50:10Z post119420: Re: How read Register Values http://community.qnx.com/sf/go/post119420 Hi Sai, give us some context: - what version of QNX are you using? - which tools are you using? - what have you tried so far, what were the results, and how did they diverge from what you were expecting? HTH Michael On Thu, 2019-01-17 at 01:38 -0500, Sai Devasani wrote: Hi, We would like to read values of "GBLRST_CAUSE0", "GBLRST_CAUSE1" and "HPR_CAUSE0" registers on target(intel Denverton) to find the reset reason. Could you please anyone help us how to fetch values stored in those three registers. Thank you in Advance... Thanks & Regards Sai _______________________________________________ OSTech http://community.qnx.com/sf/go/post119419 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com<mailto:ostech-core_os-unsubscribe@community.qnx.com> Thu, 17 Jan 2019 06:41:07 GMT http://community.qnx.com/sf/go/post119420 Michael Schuster 2019-01-17T06:41:07Z post119419: How read Register Values http://community.qnx.com/sf/go/post119419 Hi, We would like to read values of "GBLRST_CAUSE0", "GBLRST_CAUSE1" and "HPR_CAUSE0" registers on target(intel Denverton) to find the reset reason. Could you please anyone help us how to fetch values stored in those three registers. Thank you in Advance... Thanks & Regards Sai Thu, 17 Jan 2019 06:38:03 GMT http://community.qnx.com/sf/go/post119419 Sai Devasani 2019-01-17T06:38:03Z post119417: Can QNX7.0 surppport canfd? http://community.qnx.com/sf/go/post119417 Hi, everyone, I know of CAN bus in QNX7.0 is able to support, but CANFD bus, whether CAN support it, who CAN confirm? Wed, 16 Jan 2019 03:44:14 GMT http://community.qnx.com/sf/go/post119417 wang zheng(deleted) 2019-01-16T03:44:14Z post119416: Re: beaglebonedemo building script http://community.qnx.com/sf/go/post119416 Hi Dennis Kellly, works like a charm, thank you for the help. Mike Wed, 16 Jan 2019 01:02:15 GMT http://community.qnx.com/sf/go/post119416 mike scott 2019-01-16T01:02:15Z post119415: Re: beaglebonedemo building script http://community.qnx.com/sf/go/post119415 I just remembered. You may be able to edit the graphics.conf file if you run "mount -uw /base" first - then edit. Tue, 15 Jan 2019 15:39:35 GMT http://community.qnx.com/sf/go/post119415 Dennis Kellly 2019-01-15T15:39:35Z post119414: Re: beaglebonedemo building script http://community.qnx.com/sf/go/post119414 The graphics.conf you need to change is in C:\QNX660\product_deployment\QSAM\1.1\deployment\target\boards\beaglebone\etc\system\confiig\graphics.conf You will need to rebuild/redeploy the entire image after the change. Tue, 15 Jan 2019 13:40:15 GMT http://community.qnx.com/sf/go/post119414 Dennis Kellly 2019-01-15T13:40:15Z post119413: beaglebonedemo building script http://community.qnx.com/sf/go/post119413 Hi QNX, qnx sdp 6.6, qnx sdk for apps and media 1.1 release, beaglebonedemo.ext.anm11.258.150325_2017 beaglebone black, touchscreen HDMI, I am working on beaglebone black with beaglebonedemo of qnx 6.6. beaglebonedemo contains 4 files, i.e., MLO, qnx-ifs, u-boot.img, uEnv.txt. I copied these 4 files onto SDcard, and booted beaglebone black from SDcard. So far, everything went well. However, I have a 7" touchscreen with resolution 1024x600, while beaglebonedemo graphics.conf defaults @ 800x480. I tried to modify the parameters in graphics.conf, but this file is in read-only mode. I am wondering whether QNX experts able to provide the original building script of beaglebonedemo, or is there anyway to modify graphics.conf concurrently. Please advise, thanks in advance Mike Tue, 15 Jan 2019 09:30:25 GMT http://community.qnx.com/sf/go/post119413 mike scott 2019-01-15T09:30:25Z post119387: Re: RE: $LD_LIBRARY_PATH not working http://community.qnx.com/sf/go/post119387 hi John Kearney you are right, I am trying to setup qtcreator now. Thanks Mike Mon, 07 Jan 2019 08:24:01 GMT http://community.qnx.com/sf/go/post119387 mike scott 2019-01-07T08:24:01Z post119386: Re: $LD_LIBRARY_PATH not working http://community.qnx.com/sf/go/post119386 Dear Michael Schuster, you are absolutely right, should be export PATH=$PATH:xxxxx After more tests, I realizes that LD_LIBRARY_PATH has no problem at all. By default, ldd only seach ./ or the current directory. Therefore, ldd have to go with full path, for example (on BBB target device), # echo $LD_LIBRARY_PATH /proc/boot:/base/usr/anm/lib:/proc/boot:/base/usr/lib:/base/lib/dll:/base/lib:/base/lib/dll/font:/lib:/usr/lib:/lib/dll:/opt/lib:/base/usr/photon/lib:/base/usr/qt5-5.3/lib:/base/usr/lib/torch-webkit # ldd /base/usr/qt5-5.3/lib/libQt5Quick.so.5 /base/usr/qt5-5.3/lib/libQt5Quick.so.5: libQt5Quick.so.5 => /base/usr/qt5-5.3/lib/libQt5Quick.so.5.3.1 (0x78000000) libQt5Qml.so.5 => /base/usr/qt5-5.3/lib/libQt5Qml.so.5.3.1 (0x78400000) libQt5Network.so.5 => /base/usr/qt5-5.3/lib/libQt5Network.so.5.3.1 (0x78900000) libsocket.so.3 => /base/lib/libsocket.so.3 (0x783c0000) libQt5Gui.so.5 => /base/usr/qt5-5.3/lib/libQt5Gui.so.5.3.1 (0x78b00000) libQt5Core.so.5 => /base/usr/qt5-5.3/lib/libQt5Core.so.5.3.1 (0x79000000) libm.so.2 => /proc/boot/libm.so.2 (0x788a0000) libGLESv2.so.1 => /base/usr/lib/libGLESv2.so.1 (0x783e4000) libEGL.so.1 => /base/usr/lib/libEGL.so.1 (0x783ee000) libcpp.so.5 => /base/lib/libcpp.so.5 (0x78a60000) libz.so.2 => /base/usr/lib/libz.so.2 (0x788d0000) libpng14.so.0 => /base/usr/lib/libpng14.so.0 (0x788e2000) libslog2.so.1 => /base/lib/libslog2.so.1 (0x783f8000) libicui18n.so.49 => /base/usr/lib/libicui18n.so.49 (0x79500000) libicuuc.so.49 => /base/usr/lib/libicuuc.so.49 (0x79610000) libicudata.so.49 => /base/usr/lib/libicudata.so.49 (0x79700000) libpps.so.1 => /proc/boot/libpps.so.1 (0x78896000) libcpp-ne.so.5 => /base/lib/libcpp-ne.so.5 (0x78f90000) it successfully identified other files from directories such as /base/lib/ and /proc/boot/ etc, which is defined in $LD_LIBRARY_PATH. It seems that qtcreator should tell ldd where to find libQt5Quick.so.5, though $LD_LIBRARY_PATH also contains this directory of /base/usr/qt5-5.3/lib. I am working on that now. Thanks for help Mike Mon, 07 Jan 2019 08:20:26 GMT http://community.qnx.com/sf/go/post119386 mike scott 2019-01-07T08:20:26Z post119385: RE: $LD_LIBRARY_PATH not working http://community.qnx.com/sf/go/post119385 You should use ldd with the absolute path of the program executable. e.g. # ldd /bin/sh /bin/sh: libc.so.3 => /usr/lib/ldqnx.so.2 (0xb0300000) ________________________________________ From: mike scott [community-noreply@qnx.com] Sent: Sunday, January 06, 2019 09:09 To: ostech-core_os Subject: $LD_LIBRARY_PATH not working Hi QNX, qnx sdp 6.6, qnx sdk for apps and media 1.1 release, qt-5.3.1-201503051558, qtcreator 3.5.1 beaglebonedemo.ext.anm11.258.150325_2017 The beagleboneblack is booting from sdcard with MLO/u-boot.img/qnx-ifs/uEnv.txt extracted from beaglebonedemo. I am testing qtcreator on TI beaglebone black with qnx 6.6. and got error message (in qtcreator on my PC): ldd:FATAL: Could not load library libQt5Quick.so.5 The library file is actually located at /base/usr/qt5-5.3/lib (on target device, i.e., beagleboneblack), and # echo $LD_LIBRARY_PATH /base/usr/qt5-5.3/lib However, # ldd libQt5Quick.so.5 ldd ./libQt5Quick.so.5: No such file or directory I tried # export $PATH=$PATH:/base/usr/qt5-5.3/lib ldd still failed. It appears that either $PATH or $LD_LIBRARY_PATH not functioning. Please advise, thanks in advance Mike _______________________________________________ OSTech http://community.qnx.com/sf/go/post119383 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Mon, 07 Jan 2019 08:18:22 GMT http://community.qnx.com/sf/go/post119385 John Kearney 2019-01-07T08:18:22Z post119384: Re: $LD_LIBRARY_PATH not working http://community.qnx.com/sf/go/post119384 Hi, I can't comment on the LD_LIBRARY_PATH issue; one thing you definitely need to fix is your export syntax, which needs to read: # export PATH=$PATH:/base/usr/qt5-5.3/lib (note: no "$" left of "=") regards Michael On Sun, 2019-01-06 at 03:09 -0500, mike scott wrote: Hi QNX, qnx sdp 6.6, qnx sdk for apps and media 1.1 release, qt-5.3.1-201503051558, qtcreator 3.5.1 beaglebonedemo.ext.anm11.258.150325_2017 The beagleboneblack is booting from sdcard with MLO/u-boot.img/qnx-ifs/uEnv.txt extracted from beaglebonedemo. I am testing qtcreator on TI beaglebone black with qnx 6.6. and got error message (in qtcreator on my PC): ldd:FATAL: Could not load library libQt5Quick.so.5 The library file is actually located at /base/usr/qt5-5.3/lib (on target device, i.e., beagleboneblack), and # echo $LD_LIBRARY_PATH /base/usr/qt5-5.3/lib However, # ldd libQt5Quick.so.5 ldd ./libQt5Quick.so.5: No such file or directory I tried # export $PATH=$PATH:/base/usr/qt5-5.3/lib ldd still failed. It appears that either $PATH or $LD_LIBRARY_PATH not functioning. Please advise, thanks in advance Mike _______________________________________________ OSTech http://community.qnx.com/sf/go/post119383 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com<mailto:ostech-core_os-unsubscribe@community.qnx.com> Mon, 07 Jan 2019 05:51:10 GMT http://community.qnx.com/sf/go/post119384 Michael Schuster 2019-01-07T05:51:10Z post119383: $LD_LIBRARY_PATH not working http://community.qnx.com/sf/go/post119383 Hi QNX, qnx sdp 6.6, qnx sdk for apps and media 1.1 release, qt-5.3.1-201503051558, qtcreator 3.5.1 beaglebonedemo.ext.anm11.258.150325_2017 The beagleboneblack is booting from sdcard with MLO/u-boot.img/qnx-ifs/uEnv.txt extracted from beaglebonedemo. I am testing qtcreator on TI beaglebone black with qnx 6.6. and got error message (in qtcreator on my PC): ldd:FATAL: Could not load library libQt5Quick.so.5 The library file is actually located at /base/usr/qt5-5.3/lib (on target device, i.e., beagleboneblack), and # echo $LD_LIBRARY_PATH /base/usr/qt5-5.3/lib However, # ldd libQt5Quick.so.5 ldd ./libQt5Quick.so.5: No such file or directory I tried # export $PATH=$PATH:/base/usr/qt5-5.3/lib ldd still failed. It appears that either $PATH or $LD_LIBRARY_PATH not functioning. Please advise, thanks in advance Mike Sun, 06 Jan 2019 08:09:24 GMT http://community.qnx.com/sf/go/post119383 mike scott 2019-01-06T08:09:24Z post119382: Re: Can I use long double without losing precision? http://community.qnx.com/sf/go/post119382 long double is defined as 80 bits in size with a certain internal structure by some IEEE standard. So in my opinion, this is not a QNX related issue. But you could easily check that by having your code compiled for a Linux box and observe the output. Regards, Al Fri, 04 Jan 2019 16:41:08 GMT http://community.qnx.com/sf/go/post119382 Albrecht Uhlmann 2019-01-04T16:41:08Z post119377: Can I use long double without losing precision? http://community.qnx.com/sf/go/post119377 std::istringstream is losing precision when converting a string to long double. Some people told me it is because an 80-bit double (long double) is not large enough to store the number. Is this issue related to QNX itself or some compiling flags are missing? To demonstrate the problem, I wrote this code: #include <iostream> #include <string> #include <sstream> #include <iomanip> int main(){ long double convertedNumber; std::string numberString ("5.94865747678615882510631e+4931"); //From string to long double std::istringstream iss(numberString); iss >> convertedNumber; std::cout<< std::setprecision(30) << numberString << "\n"; std::cout<< std::setprecision(30) << convertedNumber << "\n"; return 0; } The output is always: 5.94865747678615882510631e+4931 5.9486574767861588254e+4931 Compiled with: QCC -V5.4.0,gcc_ntox86_64 main.cpp -o qnxTest -std=gnu++14 Mon, 31 Dec 2018 12:29:50 GMT http://community.qnx.com/sf/go/post119377 Ilyas Hamadouche 2018-12-31T12:29:50Z post119376: Call stack using bt_get_backtrace( ) http://community.qnx.com/sf/go/post119376 Hi, We are trying to do back tracing using API "bt_get_backtrace(&handler, array, 12 )" on target for our application, but we are getting only one address. Can anyone help us to increase the number of address returned by bt_get_backtrace( ) API. Thank you... in Advance Thanks & Regards Sai Mon, 31 Dec 2018 11:07:48 GMT http://community.qnx.com/sf/go/post119376 Sai Devasani 2018-12-31T11:07:48Z post119367: RE: RE: Signal Handler for Stack Overflow http://community.qnx.com/sf/go/post119367 Sorry, that won't work here either. Signals caused by CPU exceptions (SIGSEGV, SIGBUS, etc) are always delivered to the thread (and on its stack) that caused the exception. Blocking such a signal on the thread will just cause the process to be terminated when the CPU exception occurs. Blocking signals and having a single thread deal with them only works for software initiated ones (SIGQUIT, SIGTERM, etc). ________________________________________ From: Albrecht Uhlmann [community-noreply@qnx.com] Sent: December 18, 2018 9:39 AM To: ostech-core_os Subject: Re: RE: Signal Handler for Stack Overflow Thanks for clarifying Brian. What would work, to best of my belief, is to have a dedicated thread sitting in sigwaitinfo(), and have all other threads block all signals, so as to have a single point where to handle signals. If sigwaitinfo() is set up such that the SI_INFO is delivered by kernel, you should be able to see what the original thread was, and SI_CODE/SI_VALUE will tell you the reason. Having the main Thread 1 go to SIGWAITINFO after spawning off all the real worker threads seems to be a commonly used design pattern in QNX drivers, looking at a "pidin" output of a regular machine. Regards, Albrecht _______________________________________________ OSTech http://community.qnx.com/sf/go/post119366 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 18 Dec 2018 15:30:21 GMT http://community.qnx.com/sf/go/post119367 Brian Stecher 2018-12-18T15:30:21Z post119366: Re: RE: Signal Handler for Stack Overflow http://community.qnx.com/sf/go/post119366 Thanks for clarifying Brian. What would work, to best of my belief, is to have a dedicated thread sitting in sigwaitinfo(), and have all other threads block all signals, so as to have a single point where to handle signals. If sigwaitinfo() is set up such that the SI_INFO is delivered by kernel, you should be able to see what the original thread was, and SI_CODE/SI_VALUE will tell you the reason. Having the main Thread 1 go to SIGWAITINFO after spawning off all the real worker threads seems to be a commonly used design pattern in QNX drivers, looking at a "pidin" output of a regular machine. Regards, Albrecht Tue, 18 Dec 2018 14:39:47 GMT http://community.qnx.com/sf/go/post119366 Albrecht Uhlmann 2018-12-18T14:39:47Z post119365: RE: Signal Handler for Stack Overflow http://community.qnx.com/sf/go/post119365 1) won't work, since the signal handler can't be invoked - it will try to use the the same stack that originally overflowed. Neutrino doesn't have support for alternate signal handler stacks. ________________________________________ From: Albrecht Uhlmann [community-noreply@qnx.com] Sent: December 18, 2018 9:13 AM To: ostech-core_os Subject: Re: Signal Handler for Stack Overflow Some ideas, although none of them will be ideal as Elad mentioned. 1) If single-threaded process, attach signal handler such that SIGINFO is enabled. The signal code and the si_addr should tell you if something went wrong in the stack. /* * SIGSEGV codes (si_addr == address of faulting memory reference) */ #define SEGV_MAPERR 1 /* Address not mapped */ #define SEGV_ACCERR 2 /* No permissions */ #define SEGV_STKERR 3 /* ?? Stack exception */ #define SEGV_GPERR 4 /* ?? General protection */ #define SEGV_IRQERR 5 /* ?? Interrupt handler fault */ #if defined(__EXT_QNX) #define NSIGSEGV 5 #endif I do not know what the question marks mean, though. 2) Allocate all the stacks to be guarded yourself, create large enough guard page and fill stack with a well-known pattern. Create an additional thread which will periodically scan all the threads' last valid page if the pattern is still there (may cause realtime penalty). Regards, Albrecht _______________________________________________ OSTech http://community.qnx.com/sf/go/post119364 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 18 Dec 2018 14:15:48 GMT http://community.qnx.com/sf/go/post119365 Brian Stecher 2018-12-18T14:15:48Z post119364: Re: Signal Handler for Stack Overflow http://community.qnx.com/sf/go/post119364 Some ideas, although none of them will be ideal as Elad mentioned. 1) If single-threaded process, attach signal handler such that SIGINFO is enabled. The signal code and the si_addr should tell you if something went wrong in the stack. /* * SIGSEGV codes (si_addr == address of faulting memory reference) */ #define SEGV_MAPERR 1 /* Address not mapped */ #define SEGV_ACCERR 2 /* No permissions */ #define SEGV_STKERR 3 /* ?? Stack exception */ #define SEGV_GPERR 4 /* ?? General protection */ #define SEGV_IRQERR 5 /* ?? Interrupt handler fault */ #if defined(__EXT_QNX) #define NSIGSEGV 5 #endif I do not know what the question marks mean, though. 2) Allocate all the stacks to be guarded yourself, create large enough guard page and fill stack with a well-known pattern. Create an additional thread which will periodically scan all the threads' last valid page if the pattern is still there (may cause realtime penalty). Regards, Albrecht Tue, 18 Dec 2018 14:13:09 GMT http://community.qnx.com/sf/go/post119364 Albrecht Uhlmann 2018-12-18T14:13:09Z post119363: RE: Signal Handler for Stack Overflow http://community.qnx.com/sf/go/post119363 *If* the stack has a guard page and *if* the overflow hits this page (it can also jump over it, e.g. by writing to a high element in a large stack-allocated array) then the process will receive a SIGSEGV signal. Otherwise it may receive SIGBUS or nothing at all (the overflow just goes on to an adjacent mapped region). In general there is no deterministic way to detect a stack overflow. --Elad ________________________________________ From: Sai Devasani [community-noreply@qnx.com] Sent: December-18-18 8:11 AM To: ostech-core_os Subject: Signal Handler for Stack Overflow Hi, We are trying to create signal handler to catch stack over flow exception for our application on target. Can any one help us to do the same. Thank you in Advance..... Thanks & Regards Sai _______________________________________________ OSTech http://community.qnx.com/sf/go/post119361 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 18 Dec 2018 13:53:39 GMT http://community.qnx.com/sf/go/post119363 Elad Lahav 2018-12-18T13:53:39Z post119361: Signal Handler for Stack Overflow http://community.qnx.com/sf/go/post119361 Hi, We are trying to create signal handler to catch stack over flow exception for our application on target. Can any one help us to do the same. Thank you in Advance..... Thanks & Regards Sai Tue, 18 Dec 2018 13:11:41 GMT http://community.qnx.com/sf/go/post119361 Sai Devasani 2018-12-18T13:11:41Z