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 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é 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é 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é 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é 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 post119346: Re: RE: How to check hyperthreading status using CPUID http://community.qnx.com/sf/go/post119346 Thanks Elad . Wed, 05 Dec 2018 11:43:11 GMT http://community.qnx.com/sf/go/post119346 Surya kumar(deleted) 2018-12-05T11:43:11Z post119309: RE: How to check hyperthreading status using CPUID http://community.qnx.com/sf/go/post119309 Your question has nothing to do with QNX and is better asked on Intel forums. From a cursory glance around the internet it seems that bit 28 is used to indicate both HT and multi-core. In order to find whether HT is used you need to enumerate all cores and then compare logical with physical ones. See https://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/ --Elad ________________________________________ From: Surya kumar(deleted) [community-noreply@qnx.com] Sent: November-27-18 2:14 AM To: ostech-core_os Subject: Re: How to check hyperthreading status using CPUID > I found this instruction from one of the intel documentation on how to check > hyperthreading(HTT) support. > "To determine if Hyper-Threading Technology is supported, check the value > returned in EBX[23:16] after executing > CPUID with EAX=1. If EBX[23:16] contains a value >1, then the processor > supports Hyper-Threading Technology" > > I am using below code to check the same: > > void cpu_ID(unsigned int Info, unsigned int ui[4]) { > __asm__ __volatile__("cpuid" : "=a" (ui[0]), "=b" (ui[1]), "=c" (ui[2]), " > =d" (ui[3]) : "a" (ui), "c" (0)); > > } > > > int main() > { > > cpuID(1, Info); > logicalCores = (ui[1] >> 16) & 0xff; // EBX[23:16] > printf("logicl core %d \n",logicalCores); > > } > > > I always get logical cores greater than 1. > If i search the featurs of my processer online it is mentioned that Hyper > threading is NOT SUPPORTED. > > Is there any mistake the way am using CPUID and calculation. > Also please let me know if there is a better alternative for > checking if system has HTT support and weather it is enabled or disabled. > > Thank you for the support I was not able to edit the above code i posted so i am posting the code in reply :: void cpu_ID(unsigned int Info, unsigned int ui[4]) { __asm__ __volatile__("cpuid" : "=a" (ui[0]), "=b" (ui[1]), "=c" (ui[2]), "=d" (ui[3]) : "a" (info), "c" (0)); } int main() { unsigned int ui[4]; cpuID(1, ui); logicalCores = (ui[1] >> 16) & 0xff; // EBX[23:16] printf("logicl core %d \n",logicalCores); } _______________________________________________ OSTech http://community.qnx.com/sf/go/post119308 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 27 Nov 2018 11:59:59 GMT http://community.qnx.com/sf/go/post119309 Elad Lahav 2018-11-27T11:59:59Z post119308: Re: How to check hyperthreading status using CPUID http://community.qnx.com/sf/go/post119308 > I found this instruction from one of the intel documentation on how to check > hyperthreading(HTT) support. > "To determine if Hyper-Threading Technology is supported, check the value > returned in EBX[23:16] after executing > CPUID with EAX=1. If EBX[23:16] contains a value >1, then the processor > supports Hyper-Threading Technology" > > I am using below code to check the same: > > void cpu_ID(unsigned int Info, unsigned int ui[4]) { > __asm__ __volatile__("cpuid" : "=a" (ui[0]), "=b" (ui[1]), "=c" (ui[2]), " > =d" (ui[3]) : "a" (ui), "c" (0)); > > } > > > int main() > { > > cpuID(1, Info); > logicalCores = (ui[1] >> 16) & 0xff; // EBX[23:16] > printf("logicl core %d \n",logicalCores); > > } > > > I always get logical cores greater than 1. > If i search the featurs of my processer online it is mentioned that Hyper > threading is NOT SUPPORTED. > > Is there any mistake the way am using CPUID and calculation. > Also please let me know if there is a better alternative for > checking if system has HTT support and weather it is enabled or disabled. > > Thank you for the support I was not able to edit the above code i posted so i am posting the code in reply :: void cpu_ID(unsigned int Info, unsigned int ui[4]) { __asm__ __volatile__("cpuid" : "=a" (ui[0]), "=b" (ui[1]), "=c" (ui[2]), "=d" (ui[3]) : "a" (info), "c" (0)); } int main() { unsigned int ui[4]; cpuID(1, ui); logicalCores = (ui[1] >> 16) & 0xff; // EBX[23:16] printf("logicl core %d \n",logicalCores); } Tue, 27 Nov 2018 07:14:05 GMT http://community.qnx.com/sf/go/post119308 Surya kumar(deleted) 2018-11-27T07:14:05Z post119306: How to check hyperthreading status using CPUID http://community.qnx.com/sf/go/post119306 I found this instruction from one of the intel documentation on how to check hyperthreading(HTT) support. "To determine if Hyper-Threading Technology is supported, check the value returned in EBX[23:16] after executing CPUID with EAX=1. If EBX[23:16] contains a value >1, then the processor supports Hyper-Threading Technology" I am using below code to check the same: void cpu_ID(unsigned int Info, unsigned int ui[4]) { __asm__ __volatile__("cpuid" : "=a" (ui[0]), "=b" (ui[1]), "=c" (ui[2]), "=d" (ui[3]) : "a" (ui), "c" (0)); } int main() { cpuID(1, Info); logicalCores = (ui[1] >> 16) & 0xff; // EBX[23:16] printf("logicl core %d \n",logicalCores); } I always get logical cores greater than 1. If i search the featurs of my processer online it is mentioned that Hyper threading is NOT SUPPORTED. Is there any mistake the way am using CPUID and calculation. Also please let me know if there is a better alternative for checking if system has HTT support and weather it is enabled or disabled. Thank you for the support Mon, 26 Nov 2018 13:15:05 GMT http://community.qnx.com/sf/go/post119306 Surya kumar(deleted) 2018-11-26T13:15:05Z post119283: devnp-e1000.so Squelch Test errors http://community.qnx.com/sf/go/post119283 Recently, #nicinfo wm0 shows an increase in the number of errors ... Squelch Test errors ....... ... Which leads to a failure in the qnet and Tcpip protocols. Driver devnp-qnet.so vid = 0x8086, did = 0x15b3 NAME = devnp-e1000.so DESCRIPTION = Driver for Intel 82544 Gigabit Ethernet controllers DATE = 2015/11 / 30-12: 50: 20-EST STATE = stable HOST = gusbuild8 USER = builder VERSION = 1344 TAGID = PSP_networking_br650_be650SP1 What could be the causes of failures, what could be the recommendations? Thanks Tue, 13 Nov 2018 09:39:21 GMT http://community.qnx.com/sf/go/post119283 Leonid Khait 2018-11-13T09:39:21Z post119261: Re: How to retrieve PHY status, counter up/down of network stack http://community.qnx.com/sf/go/post119261 > You probably want to look at binary "nicinfo" and "netstat -s". > > You should likely post networking questions in http://community.qnx.com/sf/ > discussion/do/listTopics/projects.networking/discussion.general Dennis, Thanks for reply. Tue, 30 Oct 2018 14:30:37 GMT http://community.qnx.com/sf/go/post119261 Chris Liang(deleted) 2018-10-30T14:30:37Z post119260: Re: How to retrieve PHY status, counter up/down of network stack http://community.qnx.com/sf/go/post119260 You probably want to look at binary "nicinfo" and "netstat -s". You should likely post networking questions in http://community.qnx.com/sf/discussion/do/listTopics/projects.networking/discussion.general Tue, 30 Oct 2018 14:15:15 GMT http://community.qnx.com/sf/go/post119260 Dennis Kellly 2018-10-30T14:15:15Z post119259: Re: How to retrieve PHY status, counter up/down of network stack http://community.qnx.com/sf/go/post119259 Am I posting at right place? If I am wrong, please guide me where should I post it Thanks Tue, 30 Oct 2018 13:35:30 GMT http://community.qnx.com/sf/go/post119259 Chris Liang(deleted) 2018-10-30T13:35:30Z post119258: RE: RE: SIGSEGV coredump http://community.qnx.com/sf/go/post119258 code ß means that it originates from software i.e. slay/kill. Thats why the line outputs where the signal comes from e.g. "from pid=4603923 uid=-1 value=0(0x0)" ________________________________________ From: Sai Devasani [community-noreply@qnx.com] Sent: Wednesday, October 24, 2018 12:52 To: ostech-core_os Subject: Re: RE: SIGSEGV coredump Hi John Kearney, Thank you for the reply. We understood meaning for code = 1, 2,3 ,4 and 5. But some times we are getting code=0 also from core dump. What is the meaning for code = 0? thread 1 SIGNALLED-SIGSEGV code=0 from pid=4603923 uid=-1 value=0(0x0) ip=0x80496ea sp=0x8047bc0 stkbase=0x7fc7000 stksize=528384 state=STOPPED flags=0 last_cpu=1 timeout=00000000 pri=10 realpri=10 policy=RR tls=0x8047f90 Thank you in Advance.. _______________________________________________ OSTech http://community.qnx.com/sf/go/post119233 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 30 Oct 2018 10:41:09 GMT http://community.qnx.com/sf/go/post119258 John Kearney 2018-10-30T10:41:09Z post119257: how to USB-WIFI ? http://community.qnx.com/sf/go/post119257 Hi QNX, beaglebone black, QNX 6.5SP1, bsp-nto650-ti-beaglebone-sp1-trunk-201209071340, Realtek rtl8192 usb-wifi adapter Please help how to configure USB-WIFI in QNX. A previous post in the network forum suggests to compose a device driver, and gives the source code of asix USB-Ethernet as reference. http://community.qnx.com/sf/discussion/do/listPosts/projects.networking/discussion.drivers.topc26776?_message=1540800666226 However, when I look into rtl8192cu linux source code, I don't think I am capable to port it into QNX. Here is what I am thinking, According to http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.io-pkt_en_user_guide%2Fwpa_background.html io-pkt-v4-hc has 802.11 layer built in, and WPA utilities is able to manage wireless network connections. I am wondering whether there is a simple solution and just let build script configures USB-WIFI ? Currently, in .build script, I have Ethernet and USB-OTG setup as follows, io-pkt-v4-hc -dam335x deviceindex=0 waitfor /dev/socket if_up -p -a dm0 ifconfig dm0 192.168.31.205/16 display_msg Starting USB OTG Host driver... io-usb -vvv -d dm816x-mg ioport=0x47401c00,irq=19 waitfor /dev/io-usb/io-usb 4 QNX is able to locate the devices, # usb -vvv USB 0 (dm816x) v1.10, v1.01 DDK, v1.01 HCD Control, Interrupt, Bulk(SG), Isoch(Stream), High speed Device Address : 1 Upstream Host Controller : 0 Upstream Device Address : 0 Upstream Port : 0 Upstream Port Speed : High Vendor : 0x0bda (Realtek) Product : 0x8176 (802.11n WLAN Adapter) Device Release : r2.00 USB Spec Release : v2.00 Serial Number : 00e04c000001 Class : 0x00 (Independent per interface) Max PacketSize0 : 64 Languages : 0x0409 (English) Current Frame : 471 (1024 bytes) Configurations : 1 Configuration : 1 Attributes : 0x80 (Bus-powered) Max Power : 500 mA Interfaces : 1 Interface : 0 / 0 Class : 0xff (Vendor-specific) Subclass : 0xff Protocol : 0xff Endpoints : Control + 4 Endpoint : 0 Attributes : Control Max Packet Size: 0 Endpoint : 1 Attributes : Bulk/IN Max Packet Size: 512 Endpoint : 2 Attributes : Bulk/OUT Max Packet Size: 512 Endpoint : 3 Attributes : Bulk/OUT Max Packet Size: 512 Endpoint : 4 Attributes : Interrupt/IN Max Packet Size: 64 Interval : 1 mframe # ifconfig lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192 inet 127.0.0.1 netmask 0xff000000 dm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 address: 80:30:dc:54:02:97 media: Ethernet none (100baseTX full-duplex) status: active inet 192.168.31.205 netmask 0xffff0000 broadcast 192.168.255.255 I tried to follow "Using Wi-Fi with io-pkt" # io-pkt-v4-hc -d /lib/dll/devnp-ral.so # ifconfig lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192 inet 127.0.0.1 netmask 0xff000000 which actually kills dm0, and does not invoke ral0 for wifi as well. Please advice , thanks in advance. Mike Tue, 30 Oct 2018 02:21:44 GMT http://community.qnx.com/sf/go/post119257 mike scott 2018-10-30T02:21:44Z post119256: How to retrieve PHY status, counter up/down of network stack http://community.qnx.com/sf/go/post119256 Hi all, Our product is running on QNX(6.4). At the power up, our product is sending UDP broadcasting packages to the network. some TCP connections established by remote machines. Now I am currently having a network communication issue. at the startup, everything is fine, I saw UDP/TCP on the wireshark trace and I can ping the system within the network. Suddenly, our product disappears from network. I cannot ping it, no more UDP/TCP showing on the wireshark. Instead remote machines sends ARP to the network. I would like to debug deeper on the network stack. How should I get the PHY status, counter up/down, etc? Thanks in advance.. Mon, 29 Oct 2018 20:19:14 GMT http://community.qnx.com/sf/go/post119256 Chris Liang(deleted) 2018-10-29T20:19:14Z post119251: Re: RE: RE: std::shared_future failed in C++ http://community.qnx.com/sf/go/post119251 Thank you Elad and Stephen for your valuable help. Now it is working! I used: QCC -V5.4.0,gcc_ntox86_64 test_promise.cpp -o testPromise -std=gnu++14 Best wishes, Ilyas Fri, 26 Oct 2018 05:45:41 GMT http://community.qnx.com/sf/go/post119251 Ilyas Hamadouche 2018-10-26T05:45:41Z post119243: Re: RE: RE: std::shared_future failed in C++ http://community.qnx.com/sf/go/post119243 > I am using the command: > QCC -V5.4.0,gcc_ntox86_64_gpp test_promise.cpp -o testPromise -std=gnu++14 > > I am not sure how to link libc++.so instead QCC -V5.4.0,gcc_ntox86_64 test_promise.cpp -o testPromise -std=gnu++14 Thu, 25 Oct 2018 14:16:21 GMT http://community.qnx.com/sf/go/post119243 Stephen Webb 2018-10-25T14:16:21Z post119242: RE: std::shared_future failed in C++ http://community.qnx.com/sf/go/post119242 Try specifying -std=c++11 (or -std=c++14) instead of -std=gnu++14. --Elad (And why do email clients keep adding "RE:"s and "Re:"s to every reply?) On Thu, 2018-10-25 at 07:59 -0400, Ilyas Hamadouche wrote: > I am using the command: > QCC -V5.4.0,gcc_ntox86_64_gpp test_promise.cpp -o testPromise > -std=gnu++14 > > I am not sure how to link libc++.so instead > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post119240 > To cancel your subscription to this discussion, please e-mail ostech- > core_os-unsubscribe@community.qnx.com Thu, 25 Oct 2018 14:14:21 GMT http://community.qnx.com/sf/go/post119242 Elad Lahav 2018-10-25T14:14:21Z post119240: Re: RE: RE: std::shared_future failed in C++ http://community.qnx.com/sf/go/post119240 I am using the command: QCC -V5.4.0,gcc_ntox86_64_gpp test_promise.cpp -o testPromise -std=gnu++14 I am not sure how to link libc++.so instead Thu, 25 Oct 2018 11:59:09 GMT http://community.qnx.com/sf/go/post119240 Ilyas Hamadouche 2018-10-25T11:59:09Z post119239: RE: RE: std::shared_future failed in C++ http://community.qnx.com/sf/go/post119239 Try linking with libc++.so instead. That's what my executable is linked to and it works. ________________________________________ From: Ilyas Hamadouche [community-noreply@qnx.com] Sent: October-25-18 7:04 AM To: ostech-core_os Subject: Re: RE: std::shared_future failed in C++ I don't have readelf, but running "ldd ./testPromise" gives the following: libsocket.so.3 => /lib/libsocket.so.3 (0x2b5000) libstdc++.so.6 => /lib/libstdc++.so.6.0.21 (0x4f7000) libm.so.3 => /proc/boot/libm.so.3 (0x893000) libc.so.4 => /usr/lib/ldqnx-64.so.2 (0x0) I use the same code, just with some printing. Ilyas, _______________________________________________ OSTech http://community.qnx.com/sf/go/post119238 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 25 Oct 2018 11:30:39 GMT http://community.qnx.com/sf/go/post119239 Elad Lahav 2018-10-25T11:30:39Z post119238: Re: RE: std::shared_future failed in C++ http://community.qnx.com/sf/go/post119238 I don't have readelf, but running "ldd ./testPromise" gives the following: libsocket.so.3 => /lib/libsocket.so.3 (0x2b5000) libstdc++.so.6 => /lib/libstdc++.so.6.0.21 (0x4f7000) libm.so.3 => /proc/boot/libm.so.3 (0x893000) libc.so.4 => /usr/lib/ldqnx-64.so.2 (0x0) I use the same code, just with some printing. Ilyas, Thu, 25 Oct 2018 11:04:22 GMT http://community.qnx.com/sf/go/post119238 Ilyas Hamadouche 2018-10-25T11:04:22Z post119237: RE: std::shared_future failed in C++ http://community.qnx.com/sf/go/post119237 Which C++ library are you linking against? You can check that with # readelf -d ./testPromise Is the code you built identical to the example? ________________________________________ From: Ilyas Hamadouche [community-noreply@qnx.com] Sent: October-25-18 6:01 AM To: ostech-core_os Subject: Re: RE: std::shared_future failed in C++ Thank you for response Elad. It actually builds, but when running it stuck at fut2.wait(); The output of "pidin -p 1200146 -v" is: pid tid name prio STATE Blocked 1200146 1 ./testPromise 10r CONDVAR (0x806c17c) 1200146 2 ./testPromise 10r CONDVAR (0x806c0bc) 1200146 3 ./testPromise 10r MUTEX (0x1002b2790) self(1200146)-02 #1 My QNX version (using uname -a): QNX localhost 7.0.1 2018/02/06-14:30:25EST x86pc x86_64 Ilyas, _______________________________________________ OSTech http://community.qnx.com/sf/go/post119236 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 25 Oct 2018 10:13:27 GMT http://community.qnx.com/sf/go/post119237 Elad Lahav 2018-10-25T10:13:27Z post119236: Re: RE: std::shared_future failed in C++ http://community.qnx.com/sf/go/post119236 Thank you for response Elad. It actually builds, but when running it stuck at fut2.wait(); The output of "pidin -p 1200146 -v" is: pid tid name prio STATE Blocked 1200146 1 ./testPromise 10r CONDVAR (0x806c17c) 1200146 2 ./testPromise 10r CONDVAR (0x806c0bc) 1200146 3 ./testPromise 10r MUTEX (0x1002b2790) self(1200146)-02 #1 My QNX version (using uname -a): QNX localhost 7.0.1 2018/02/06-14:30:25EST x86pc x86_64 Ilyas, Thu, 25 Oct 2018 10:01:21 GMT http://community.qnx.com/sf/go/post119236 Ilyas Hamadouche 2018-10-25T10:01:21Z post119235: RE: std::shared_future failed in C++ http://community.qnx.com/sf/go/post119235 Works for me. Can you elaborate on "fails on QNX"? Fails to build? To terminate? What version of QNX are you using? --Elad ________________________________________ From: Ilyas Hamadouche [community-noreply@qnx.com] Sent: October-24-18 6:44 AM To: ostech-core_os Subject: std::shared_future failed in C++ Hi, I am trying to use shared_future but without success. The following link illustrates a clear example that works fine in Linux, but fails in QNX. https://en.cppreference.com/w/cpp/thread/shared_future Does anybody have an idea if this a bug in QNX? BR, Ilyas _______________________________________________ OSTech http://community.qnx.com/sf/go/post119232 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 25 Oct 2018 09:44:12 GMT http://community.qnx.com/sf/go/post119235 Elad Lahav 2018-10-25T09:44:12Z post119233: Re: RE: SIGSEGV coredump http://community.qnx.com/sf/go/post119233 Hi John Kearney, Thank you for the reply. We understood meaning for code = 1, 2,3 ,4 and 5. But some times we are getting code=0 also from core dump. What is the meaning for code = 0? thread 1 SIGNALLED-SIGSEGV code=0 from pid=4603923 uid=-1 value=0(0x0) ip=0x80496ea sp=0x8047bc0 stkbase=0x7fc7000 stksize=528384 state=STOPPED flags=0 last_cpu=1 timeout=00000000 pri=10 realpri=10 policy=RR tls=0x8047f90 Thank you in Advance.. Wed, 24 Oct 2018 10:52:31 GMT http://community.qnx.com/sf/go/post119233 Sai Devasani 2018-10-24T10:52:31Z post119232: std::shared_future failed in C++ http://community.qnx.com/sf/go/post119232 Hi, I am trying to use shared_future but without success. The following link illustrates a clear example that works fine in Linux, but fails in QNX. https://en.cppreference.com/w/cpp/thread/shared_future Does anybody have an idea if this a bug in QNX? BR, Ilyas Wed, 24 Oct 2018 10:44:59 GMT http://community.qnx.com/sf/go/post119232 Ilyas Hamadouche 2018-10-24T10:44:59Z post119231: RE: SIGSEGV coredump http://community.qnx.com/sf/go/post119231 code=1==MAPERR ________________________________________ From: Sai Devasani [community-noreply@qnx.com] Sent: Wednesday, October 24, 2018 11:25 To: ostech-core_os Subject: SIGSEGV coredump Hi, We are trying to do analysis of a core dump file using coreinfo utility and we got below information from coredump file, thread 1 SIGNALLED-SIGSEGV code=1 MAPERR refaddr=0x7fc7ff8 fltno=11 ip=0x100027f2f sp=0x7fc8000 stkbase=0x7fc7000 stksize=528384 state=STOPPED flags=0 last_cpu=1 timeout=00000000 pri=10 realpri=10 policy=RR tls=0x8047f90 Can anyone help that what is "code=1" and "refaddr=0x7fc7ff8" here?? Thank you in Advance... _______________________________________________ OSTech http://community.qnx.com/sf/go/post119230 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 24 Oct 2018 10:21:46 GMT http://community.qnx.com/sf/go/post119231 John Kearney 2018-10-24T10:21:46Z post119230: SIGSEGV coredump http://community.qnx.com/sf/go/post119230 Hi, We are trying to do analysis of a core dump file using coreinfo utility and we got below information from coredump file, thread 1 SIGNALLED-SIGSEGV code=1 MAPERR refaddr=0x7fc7ff8 fltno=11 ip=0x100027f2f sp=0x7fc8000 stkbase=0x7fc7000 stksize=528384 state=STOPPED flags=0 last_cpu=1 timeout=00000000 pri=10 realpri=10 policy=RR tls=0x8047f90 Can anyone help that what is "code=1" and "refaddr=0x7fc7ff8" here?? Thank you in Advance... Wed, 24 Oct 2018 09:25:34 GMT http://community.qnx.com/sf/go/post119230 Sai Devasani 2018-10-24T09:25:34Z post119229: Re: Socket accept() never return when shutting down the socket with another thread http://community.qnx.com/sf/go/post119229 This is the code I run. In Linux it doesn't block, but in QNX it blocks forever! Tue, 23 Oct 2018 12:51:58 GMT http://community.qnx.com/sf/go/post119229 Ilyas Hamadouche 2018-10-23T12:51:58Z post119228: Socket accept() never return when shutting down the socket with another thread http://community.qnx.com/sf/go/post119228 Hi, I am testing the behavior of a socket when it is in the accept () state waiting for a connection, and then it is shut down by another thread. In this case, in Linux the accept function is interrupted and caused to return with an error. However, in QNX the accept doesn't return when shutting down the socket. I would like to know if this is a normal behavior in QNX? or there some settings to be set to cause the accept() to return? (Socket type used: SOCK_STREAM) BR, Ilyas Tue, 23 Oct 2018 10:56:26 GMT http://community.qnx.com/sf/go/post119228 Ilyas Hamadouche 2018-10-23T10:56:26Z post119226: TraceEvent: detecting thread death, distinguishing between DEAD STATE and final free up of resources http://community.qnx.com/sf/go/post119226 Hello, another question regarding the TraceEvent exact events meaning; the basic issue is I think the lack of source code, but maybe there is some precise documentation somewhere? I am interested in what the events mean _exactly_. I am trying to detect the point in time when a thread is actually destroyed, waiters are woken up and resources are freed. I was using the event _TRACE_PR_TH_DESTROY_T (_TRACE_THREAD_DESTROY) before, but looking at the results this seems to mean something entirely different. I see the _TRACE_THREAD_DESTROY event before I see the TRACE_DEAD state change event, and I seem to not have any event for detecting whether all resources have been successfully freed, waiters notified, etc. I do have some event for the whole process (DESTROY_P seems to be the one), but not for the single thread. It would be very useful to be able to pinpoint when the resources are actually freed, and the (pid, tid) couple is released back to the OS. This would detect Zombie threads for example. I saw some changes in some old QNX 6.x source code third party repo, https://github.com/vocho/openqnx.git which apparently tried to work around this very problem (in nano_thread,c, see mt_trace_task_delete): https://github.com/vocho/openqnx/blob/cc95df3543a1c481d4f8ad387e29f0d1ff0c87fe/trunk/services/system/ker/nano_thread.c#L565 Thank you for any advice, Claudio Sun, 21 Oct 2018 10:37:32 GMT http://community.qnx.com/sf/go/post119226 Claudio Fontana 2018-10-21T10:37:32Z post119225: TraceEvent: detecting fork/exec and spawn idiomatic sequences http://community.qnx.com/sf/go/post119225 Hi all, I am trying to detect process creation and process "renames", in particular looking at the fork/exec and spawn sequences from a POSIX perspective. When looking at the PROCESS class of events I am seeing the following when running a command on the shell (in this case the command "cat"): t:0x54f21c6ce18 CPU:01 PROCESS :PROCCREATE ppid:483347 pid:1064985 t:0x54f21d07a5b CPU:01 PROCESS :PROCCREATE_NAME ppid:483347 pid:1064985 name:bin/sh t:0x54f21dc5a56 CPU:01 PROCESS :PROCCREATE ppid:1064985 pid:1064986 t:0x54f21f2d4ca CPU:01 PROCESS :PROCCREATE_NAME ppid:483347 pid:1064985 name:proc/boot/cat t:0x54f21f2ed36 CPU:01 PROCESS :PROCDESTROY ppid:1064985 pid:1064986 Can I rely on this sequence to represent the usual fork()/exec() pattern? Is it the same in the case of spawn()? I noticed in particular that the first PROCCREATE_NAME seems to correspond to a fork(), as the name of the new process matches the parent shell bin/sh, which is shown in the "initial state" sequence of pseudo-PROCCREATE_NAME events as bin/sh. The second PROCCREATE_NAME differs from the preceding PROCCREATE in pid and ppid. The second PROCCREATE seems to refer to a "dummy" process, which is destroyed just after its creation, while the second PROCCREATE_NAME seems to refer to the first pid, and thus I map this to "exec()". Am I looking at this correctly? Is this always the case that this sequence is followed for the creation of new processes? Thank you as always for your helpful comments, Claudio Sat, 20 Oct 2018 09:42:09 GMT http://community.qnx.com/sf/go/post119225 Claudio Fontana 2018-10-20T09:42:09Z post119221: Re: Changing the access rigths of address space created by mmap() http://community.qnx.com/sf/go/post119221 Normally If i want to do something like this I'd just do struct shmem_area_rw_s{ int myelemeta; }__attribute__((aligned (PAGE_SIZE))); struct shmem_area_ro_s{ int my_elemetb; }__attribute__((aligned (PAGE_SIZE))); typedef struct shmem_area_s{ struct shmem_area_rw_s rw; struct shmem_area_ro_s ro; }shmem_area_st; shmem_area_st d; int main(){ printf("%s : %zd\n", "shmem_area_st", sizeof(shmem_area_st)); printf("%s : %zd\n", "struct shmem_area_rw_s", sizeof(struct shmem_area_rw_s)); printf("%s : %zd\n", "struct shmem_area_ro_s", sizeof(struct shmem_area_ro_s)); mprotect(&d.ro, sizeof(d.ro), PROT_READ); return 0; } Wed, 17 Oct 2018 13:31:59 GMT http://community.qnx.com/sf/go/post119221 John Kearney 2018-10-17T13:31:59Z post119220: Re: Changing the access rigths of address space created by mmap() http://community.qnx.com/sf/go/post119220 While you can't change the access rights for anything less than a page you may well want to change the rights to a much larger amount of memory, hence the len parameter. This isn't by the way a limitation of QNX itself, all OSes have similar restrictions since it's the way hardware works. This is more or less what a page is, a range of memory that has some common characteristics. Doesn't have to be 4k, can be more and can be less but still something that is done at the hardware level. To allow different memory to have different access rights, the access rights have to be stored somewhere; memory has to be devoted to it. While a processor could allow just what you’re after, the overhead in memory and time would be enormous. So it’s a trade-off between better granularity and more efficient memory usage. On 2018-10-17, 2:05 AM, "Sri Harsha Koribille" <community-noreply@qnx.com> wrote: Hi David, I'm using QNX 7.0 After using mprotect(), it is changing the access rights of other pointers in the address space too( as mentioned in your answer). If thats the case, in "int mprotect( void * addr, size_t len,int prot )", what is the significance of "len" parameter Is it possible to change the access rights of just a single pointer and not the entire CPU page? _______________________________________________ OSTech http://community.qnx.com/sf/go/post119219 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 17 Oct 2018 12:56:00 GMT http://community.qnx.com/sf/go/post119220 Roger Maclean 2018-10-17T12:56:00Z post119219: Re: RE: Changing the access rigths of address space created by mmap() http://community.qnx.com/sf/go/post119219 Hi David, I'm using QNX 7.0 After using mprotect(), it is changing the access rights of other pointers in the address space too( as mentioned in your answer). If thats the case, in "int mprotect( void * addr, size_t len,int prot )", what is the significance of "len" parameter Is it possible to change the access rights of just a single pointer and not the entire CPU page? Wed, 17 Oct 2018 06:20:31 GMT http://community.qnx.com/sf/go/post119219 Sri Harsha Koribille 2018-10-17T06:20:31Z post119217: RE: Changing the access rigths of address space created by mmap() http://community.qnx.com/sf/go/post119217 Which version of the OS are you using? You can use the mprotect() function to modify the access rights of a mapped page. All access permissions are set per CPU page, which are 4KiB in size. David ________________________________________ From: Sri Harsha Koribille [community-noreply@qnx.com] Sent: Monday, October 15, 2018 11:15 AM To: ostech-core_os Subject: Changing the access rigths of address space created by mmap() Hello, I have a shared memory object and mapped it into my process address space using mmap() with write access. Lets say the base address of the object is 0x01 and length of the mapping be 30 bytes. Is it possible to change the access rights of the a memory region in between (eg. 0x06 to 0x09) to read only?? _______________________________________________ OSTech http://community.qnx.com/sf/go/post119216 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Mon, 15 Oct 2018 15:25:25 GMT http://community.qnx.com/sf/go/post119217 David Sarrazin 2018-10-15T15:25:25Z post119216: Changing the access rigths of address space created by mmap() http://community.qnx.com/sf/go/post119216 Hello, I have a shared memory object and mapped it into my process address space using mmap() with write access. Lets say the base address of the object is 0x01 and length of the mapping be 30 bytes. Is it possible to change the access rights of the a memory region in between (eg. 0x06 to 0x09) to read only?? Mon, 15 Oct 2018 15:15:59 GMT http://community.qnx.com/sf/go/post119216 Sri Harsha Koribille 2018-10-15T15:15:59Z post119206: Re: SCTP availability http://community.qnx.com/sf/go/post119206 Hello, just mentioning that I would like also to know the answer to this question.. Thank you, Claudio Fri, 12 Oct 2018 12:56:53 GMT http://community.qnx.com/sf/go/post119206 Claudio Fontana 2018-10-12T12:56:53Z post119202: Re: missing interrupts http://community.qnx.com/sf/go/post119202 Oh yes... we are using QNX 6.6 with APIC bsp, Kontron ktqm87 motherboard, and Intel i350-t4 network card Thu, 11 Oct 2018 14:53:36 GMT http://community.qnx.com/sf/go/post119202 Chen Chen 2018-10-11T14:53:36Z post119201: Re: missing interrupts http://community.qnx.com/sf/go/post119201 can you share some details on HW and SW (ie which version of QNX you're using, which drivers .... )? On Wed, 2018-10-10 at 17:24 -0400, Chen Chen wrote: We are experiencing a data loss issue on our QNX x86, with an application that reads and writes to a board at roughly 1kHz over UDP. We have recently observed that data in both directions get dropped quite frequently (about ten times per second), and it seems to happen whenever the read and write are scheduled to occur close to each other in time. Looking at the kernel trace of the QNX machine, we don't even see the interrupt for the missing incoming UDP packet. When capturing traffic over a mirroring network switch, we are able to see this missing packet on the wire, but are not able to see the outgoing packet that should be occuring around the same time. We have not been able to find any other unusual behavior in either kernel traces or wireshark capture, and are particularly buffled about the bi-directional nature of this problem, given that the UDP write should not involve interrupts. Has anyone seen something like this before? Any suggestions or recommended tools are appreciated! _______________________________________________ OSTech http://community.qnx.com/sf/go/post119200 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, 11 Oct 2018 05:16:09 GMT http://community.qnx.com/sf/go/post119201 Michael Schuster 2018-10-11T05:16:09Z