Re: 3MB Memory Leak in KDrive Xfbdev
Hello All, I am able to fix the 3M memory leak. 1M as explained already and the other 2M was because of my mistake -one extra thread that I had launched and was not getting freed. However, I still see few kBs ~132kB of memory leaked in every 2-3 iterations of Init-Term Xserver. Note: In some iterations of Init-TermX there is 0 memory leak and some there is a chunk of 132kB. Also, I am still stuck with failure(Device or resource busy) is ioctl(fd, DISALLOCATE, vtno) in LinuxFini(). I doubt this for the 132kB leak. Can anyone help me out with this? Note: This ioctl failure happens only on target board (ARM) and not on x86. Any inputs related to above would be very useful to me. Thanks again, Vrushali On Tue, Nov 2, 2010 at 9:48 AM, vrushali shinde vrushali1...@gmail.comwrote: Thanks a lot for your responses. BTW, I need a light weight server and KDrive being a stripped down version of Xorg, I am using KDrive. Also I did get some success in freeing 1M out of 3M memory that was leaked. This is achieved by calling mieqFini() at termination of Xserver. This function internally calls FreeEventlist() which frees the 1M memory allocated in InitEventList(). If anyone has any more idea of the memory leak in KDrive please let me know. Thanks again, Vrushali On Mon, Nov 1, 2010 at 7:32 PM, Tiago Vignatti tiago.vigna...@nokia.comwrote: Hi, On Mon, Nov 01, 2010 at 11:45:57AM +0530, ext vrushali shinde wrote: Hello All, I need to fix memory leak issue urgently, any inputs regarding this would very useful to me. Thanks again. Kdrive development is practically dead. We just have some few people working on Xephyr backend and the other hw servers are due to be extinct. To substitute kdrive + fbdev you can try Xorg + fbdev driver which should be all the work you need. On Wed, Oct 27, 2010 at 4:33 PM, vrushali shinde vrushali1...@gmail.comwrote: Hello All, I need to launch XServer in a thread and terminate(release resources and kill thread) XServer whenever required. To achieve this, I have created a shared library of Kdrive-XServer. To start XServer I load the Xserver shared lib, and launch the Xfbdev server in a thread. For terminating Xserver, I callGiveUp (0); function, that releases the XServer resources, then I dlclose on Xserver library. However, when I start and terminate XServer in above way, there seems to happen 3MB of memory leak in every cycle. After narrowing down it is seen that following 2 function calls increase the memory to 3M at start and is not release at termination. The functions are: InitInput(argc, argv); and InitAndStartDevices(); These are the observation on ARM target board. When above scenario is simulated on x86 machine, and Valgrind is run, it does not show memory leaks in above mentioned functions, instead it shows definite loss of 1,244 bytes of memory in KdInitOutput() and some other minor definite losses. I need to find out the 3M memory loss on target ARM board for InitInput(argc, argv); and InitAndStartDevices(); functions. For this I did try to release memory allocations in InitInput(), but no success. If I comment below lines from KdProcessArgument(), then the 3M chunk leak does not happen however with this mouse and keyboard are not initialized and I need to have keyboard and mouse. Can anyone help me out to find out the 3M chunk and how to avoid it / release it? -- KdAddConfigKeyboard(keyboard,/dev/tty0); KdAddConfigPointer(mouse,/dev/input/mice); kdHasPointer = TRUE; kdHasKbd = TRUE; In addition to information below, I also get get following error when closing VT Cant deallocate console... Can this error contribute to some or all of the 3M memory leak? Please let me know if anyone has got any clue about this or have faced simlar issue. Thanks in advance, Vrushali ___ xorg@lists.freedesktop.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg Your subscription address: tiago.vigna...@nokia.com Tiago ___ xorg@lists.freedesktop.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
Re: 3MB Memory Leak in KDrive Xfbdev
Hello All, I need to fix memory leak issue urgently, any inputs regarding this would very useful to me. Thanks again. On Wed, Oct 27, 2010 at 4:33 PM, vrushali shinde vrushali1...@gmail.comwrote: Hello All, I need to launch XServer in a thread and terminate(release resources and kill thread) XServer whenever required. To achieve this, I have created a shared library of Kdrive-XServer. To start XServer I load the Xserver shared lib, and launch the Xfbdev server in a thread. For terminating Xserver, I callGiveUp (0); function, that releases the XServer resources, then I dlclose on Xserver library. However, when I start and terminate XServer in above way, there seems to happen 3MB of memory leak in every cycle. After narrowing down it is seen that following 2 function calls increase the memory to 3M at start and is not release at termination. The functions are: InitInput(argc, argv); and InitAndStartDevices(); These are the observation on ARM target board. When above scenario is simulated on x86 machine, and Valgrind is run, it does not show memory leaks in above mentioned functions, instead it shows definite loss of 1,244 bytes of memory in KdInitOutput() and some other minor definite losses. I need to find out the 3M memory loss on target ARM board for InitInput(argc, argv); and InitAndStartDevices(); functions. For this I did try to release memory allocations in InitInput(), but no success. If I comment below lines from KdProcessArgument(), then the 3M chunk leak does not happen however with this mouse and keyboard are not initialized and I need to have keyboard and mouse. Can anyone help me out to find out the 3M chunk and how to avoid it / release it? -- KdAddConfigKeyboard(keyboard,/dev/tty0); KdAddConfigPointer(mouse,/dev/input/mice); kdHasPointer = TRUE; kdHasKbd = TRUE; In addition to information below, I also get get following error when closing VT Cant deallocate console... Can this error contribute to some or all of the 3M memory leak? Please let me know if anyone has got any clue about this or have faced simlar issue. Thanks in advance, Vrushali ___ xorg@lists.freedesktop.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
Re: 3MB Memory Leak in KDrive Xfbdev
Thanks a lot for your responses. BTW, I need a light weight server and KDrive being a stripped down version of Xorg, I am using KDrive. Also I did get some success in freeing 1M out of 3M memory that was leaked. This is achieved by calling mieqFini() at termination of Xserver. This function internally calls FreeEventlist() which frees the 1M memory allocated in InitEventList(). If anyone has any more idea of the memory leak in KDrive please let me know. Thanks again, Vrushali On Mon, Nov 1, 2010 at 7:32 PM, Tiago Vignatti tiago.vigna...@nokia.comwrote: Hi, On Mon, Nov 01, 2010 at 11:45:57AM +0530, ext vrushali shinde wrote: Hello All, I need to fix memory leak issue urgently, any inputs regarding this would very useful to me. Thanks again. Kdrive development is practically dead. We just have some few people working on Xephyr backend and the other hw servers are due to be extinct. To substitute kdrive + fbdev you can try Xorg + fbdev driver which should be all the work you need. On Wed, Oct 27, 2010 at 4:33 PM, vrushali shinde vrushali1...@gmail.com wrote: Hello All, I need to launch XServer in a thread and terminate(release resources and kill thread) XServer whenever required. To achieve this, I have created a shared library of Kdrive-XServer. To start XServer I load the Xserver shared lib, and launch the Xfbdev server in a thread. For terminating Xserver, I callGiveUp (0); function, that releases the XServer resources, then I dlclose on Xserver library. However, when I start and terminate XServer in above way, there seems to happen 3MB of memory leak in every cycle. After narrowing down it is seen that following 2 function calls increase the memory to 3M at start and is not release at termination. The functions are: InitInput(argc, argv); and InitAndStartDevices(); These are the observation on ARM target board. When above scenario is simulated on x86 machine, and Valgrind is run, it does not show memory leaks in above mentioned functions, instead it shows definite loss of 1,244 bytes of memory in KdInitOutput() and some other minor definite losses. I need to find out the 3M memory loss on target ARM board for InitInput(argc, argv); and InitAndStartDevices(); functions. For this I did try to release memory allocations in InitInput(), but no success. If I comment below lines from KdProcessArgument(), then the 3M chunk leak does not happen however with this mouse and keyboard are not initialized and I need to have keyboard and mouse. Can anyone help me out to find out the 3M chunk and how to avoid it / release it? -- KdAddConfigKeyboard(keyboard,/dev/tty0); KdAddConfigPointer(mouse,/dev/input/mice); kdHasPointer = TRUE; kdHasKbd = TRUE; In addition to information below, I also get get following error when closing VT Cant deallocate console... Can this error contribute to some or all of the 3M memory leak? Please let me know if anyone has got any clue about this or have faced simlar issue. Thanks in advance, Vrushali ___ xorg@lists.freedesktop.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg Your subscription address: tiago.vigna...@nokia.com Tiago ___ xorg@lists.freedesktop.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
3MB Memory Leak in KDrive Xfbdev
Hello All, I need to launch XServer in a thread and terminate(release resources and kill thread) XServer whenever required. To achieve this, I have created a shared library of Kdrive-XServer. To start XServer I load the Xserver shared lib, and launch the Xfbdev server in a thread. For terminating Xserver, I callGiveUp (0); function, that releases the XServer resources, then I dlclose on Xserver library. However, when I start and terminate XServer in above way, there seems to happen 3MB of memory leak in every cycle. After narrowing down it is seen that following 2 function calls increase the memory to 3M at start and is not release at termination. The functions are: InitInput(argc, argv); and InitAndStartDevices(); These are the observation on ARM target board. When above scenario is simulated on x86 machine, and Valgrind is run, it does not show memory leaks in above mentioned functions, instead it shows definite loss of 1,244 bytes of memory in KdInitOutput() and some other minor definite losses. I need to find out the 3M memory loss on target ARM board for InitInput(argc, argv); and InitAndStartDevices(); functions. For this I did try to release memory allocations in InitInput(), but no success. If I comment below lines from KdProcessArgument(), then the 3M chunk leak does not happen however with this mouse and keyboard are not initialized and I need to have keyboard and mouse. Can anyone help me out to find out the 3M chunk and how to avoid it / release it? -- KdAddConfigKeyboard(keyboard,/dev/tty0); KdAddConfigPointer(mouse,/dev/input/mice); kdHasPointer = TRUE; kdHasKbd = TRUE; In addition to information below, I also get get following error when closing VT Cant deallocate console... Can this error contribute to some or all of the 3M memory leak? Please let me know if anyone has got any clue about this or have faced simlar issue. Thanks in advance, Vrushali ___ xorg@lists.freedesktop.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
3MB Memory Leak in KDrive Xfbdev
Hello All, I need to launch XServer in a thread and terminate(release resources and kill thread) XServer whenever required. To achieve this, I have created a shared library of Kdrive-XServer. To start XServer I load the Xserver shared lib, and launch the Xfbdev server in a thread. For terminating Xserver, I callGiveUp (0); function, that releases the XServer resources, then I dlclose on Xserver library. However, when I start and terminate XServer in above way, there seems to happen 3MB of memory leak in every cycle. After narrowing down it is seen that following 2 function calls increase the memory to 3M at start and is not release at termination. The functions are: InitInput(argc, argv); and InitAndStartDevices(); These are the observation on ARM target board. When above scenario is simulated on x86 machine, and Valgrind is run, it does not show memory leaks in above mentioned functions, instead it shows definite loss of 1,244 bytes of memory in KdInitOutput() and some other minor definite losses. I need to find out the 3M memory loss on target ARM board for InitInput(argc, argv); and InitAndStartDevices(); functions. For this I did try to release memory allocations in InitInput(), but no success. If I comment below lines from KdProcessArgument(), then the 3M chunk leak does not happen however with this mouse and keyboard are not initialized and I need to have keyboard and mouse. Can anyone help me out to find out the 3M chunk and how to avoid it / release it? -- KdAddConfigKeyboard(keyboard,/dev/tty0); KdAddConfigPointer(mouse,/dev/input/mice); kdHasPointer = TRUE; kdHasKbd = TRUE; Thanks and Regards, Vrushali ___ xorg@lists.freedesktop.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
AllocNewConnection fails:: (fd lastfdesc)
Hello All, When I run Xfbdev server with IPV4 on a target machine, for initial 3-4 mins everything is fine and I can launch clients. However, after some time, below thrift error messages are generated by the system from some other module *Thrift: Thu Jan .TServerSocket::listen() IPV6_V6ONLY Protocol not available* When I try to run any Xclient after this error occurs, *Xserver fails in AllocNewConnection::: **fd[259] lastfddesc[256]* Also Xserver is not ale to launch any client after this error. Note: Before the above mentioned thrift error messages occur, the *fd values *are* 256 *and clients are laucnhed successfully. However, after the thrift error messages occur, *fd value 256 *and clients cannot be launched. * * I am not aware of the complete stack running on the system, hence dont know if any other module is affecting. Could anyone please let me know what could be the issue in getting *fd value256* ? And how I can trace/ fix the issue? Note: I also tried compiling Xserver with IPV6, but I still get the same issue. Thanks and Regards, Vrushali ___ xorg@lists.freedesktop.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com