<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Salut Mihai,<div class=""><br class=""></div><div class="">Testul 16) din setul de teste locale se refera la “Test Round Robin”, dar pe vmchecker, acest test are indentificatorul 15).</div><div class="">Referitor la modul de rulare, pe masina virtuala de linux rulam testul 16 astfel:</div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">LD_LIBRARY_PATH=. valgrind --tool=memcheck ./_test/run_test 16</span></div></div><div class=""><br class=""></div><div class=""><div>Outputul valgrind-ului este:</div><div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">==16733== Memcheck, a memory error detector</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">==16733== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">==16733== Using Valgrind-3.15.0.GIT and LibVEX; rerun with -h for copyright info</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">==16733== Command: ./_test/run_test 16</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">==16733== </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Killed</span></div></div><div><br class=""></div><div>Logurile de sistem ce apar indica:</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Apr 24 20:09:14 vagrant kernel: [118109.973987] Out of memory: Kill process 16733 (memcheck-amd64-) score 863 or sacrifice child</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Apr 24 20:09:14 vagrant kernel: [118109.976517] Killed process 16733 (memcheck-amd64-) total-vm:4716800kB, anon-rss:302812kB, file-rss:0kB, shmem-rss:0kB</span></div><div><span style="font-family: Menlo; font-size: 11px;" class="">Apr 24 20:09:14 vagrant kernel: [118110.013082] oom_reaper: reaped process 16733 (memcheck-amd64-), now anon-rss:0kB, file-rss:0kB, shmem-rss:0k</span></div><div><br class=""></div><div>Acest comportament se manifesta doar pe masina virtuala care ruleaza pe calculatorul meu, doar pe testul 16. (celelalte teste nu dau erori la verificarea cu valgrind).</div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div>Dar pe vmchecker trec toate testele de memcheck. :)</div><div>Multumesc,</div><div>Rares</div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On 24 Apr 2019, at 14:30, Mihai Barbulescu <<a href="mailto:b12mihai@gmail.com" class="">b12mihai@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Salut Rares,<br class=""><br class="">Sunt mai multe chestii pe care nu le inteleg:<br class=""><br class="">1. Cum adica test 16 (15 pe vm)? Ele au un identificator clar, deci nu<br class="">inteleg ce test pica<br class="">2. OOM manager din Linux da kill atunci cand se fac alocari (page<br class="">faults) excesive peste o limita setata daca imi amintesc bine de<br class="">ulimit. Eroarea pare una de vagrant, deci e posibil sa fi pornit<br class="">folosind vagrant masina si sa ti se fi dat kill la vagrant.<br class=""><br class="">Ne dai atat de putine detalii despre cum rulezi incat nu putem face<br class="">altceva decat sa speculam mai ceva ca la bursa.<br class=""><br class="">On Wed, 24 Apr 2019 at 10:16, Rares Folea via so <<a href="mailto:so@cursuri.cs.pub.ro" class="">so@cursuri.cs.pub.ro</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">Multumesc de hint.<br class="">Intradevar, problema era ca nu asteptam in toate scenariile, dupa toate threadurile.<br class=""><br class="">Acum vad ca trec toate testele de memorie pe vmchecker.<br class=""><br class=""><br class="">Doar pe masina virtuala, cand rulez valgrind peste acel test 16 (15 pe vm), logurile de sistem indica out-of-memory:<br class="">Apr 24 10:11:14 vagrant kernel: [109075.123564] Out of memory: Kill process 11250 (memcheck-amd64-) score 866 or sacrifice child<br class="">Apr 24 10:11:14 vagrant kernel: [109075.124387] Killed process 11250 (memcheck-amd64-) total-vm:4736696kB, anon-rss:309400kB, file-rss:0kB, shmem-rss:0kB<br class="">Apr 24 10:11:14 vagrant kernel: [109075.153180] oom_reaper: reaped process 11250 (memcheck-amd64-), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB<br class=""><br class=""><br class="">On 23 Apr 2019, at 22:27, Razvan Crainea <<a href="mailto:razvan.crainea@gmail.com" class="">razvan.crainea@gmail.com</a>> wrote:<br class=""><br class="">Salut, Rareș!<br class=""><br class="">Cel mai probabil nu aștepți toate thread-urile, de acolo apare leak-ul.<br class="">Legat de faptul că că procesul este omorât, poți verifica log-urile de<br class="">sistem să te asiguri că nu este un crash?<br class=""><br class="">Numai bine,<br class="">Răzvan<br class=""><br class="">On Tue, Apr 23, 2019 at 9:10 PM Rares Folea via so <<a href="mailto:so@cursuri.cs.pub.ro" class="">so@cursuri.cs.pub.ro</a>> wrote:<br class=""><br class=""><br class="">Buna seara!<br class=""><br class="">Ma confrunt cu urmatoarele probleme referitoare la testele de memorie:<br class=""><br class="">La rularea pe masina virtuala cu valgrind a testelor 15 si 19 (14 si 18 pe vmchecker), obtin 2 erori similare:<br class=""><br class="">==4684== 288 bytes in 1 blocks are possibly lost in loss record 2 of 2<br class="">==4684== at 0x4C3204A: calloc (vg_replace_malloc.c:762)<br class="">==4684== by 0x40134A6: allocate_dtv (dl-tls.c:286)<br class="">==4684== by 0x40134A6: _dl_allocate_tls (dl-tls.c:530)<br class="">==4684== by 0x5049227: allocate_stack (allocatestack.c:627)<br class="">==4684== by 0x5049227: pthread_create@@GLIBC_2.2.5 (pthread_create.c:644)<br class="">==4684== by 0x4E3E65B: so_fork (in /home/student/l3-so-assignments/4-scheduler/checker-lin/libscheduler.so)<br class="">==4684== by 0x10ABDE: test_sched_handler_15 (test_exec.c:282)<br class="">==4684== by 0x4E3E47E: start_thread (in /home/student/l3-so-assignments/4-scheduler/checker-lin/libscheduler.so)<br class="">==4684== by 0x50486DA: start_thread (pthread_create.c:463)<br class="">==4684== by 0x538188E: clone (clone.S:95)<br class=""><br class="">==4684== possibly lost: 576 bytes in 2 blocks<br class=""><br class="">==4684== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)<br class=""><br class="">Nu reusesc sa-mi dau seama de la ce ar putea fi cele doua erori si de ce se manifesta doar la aceste doua teste.<br class="">Mentionez ca astept terminarea thread-urilor cu pthread_join, care ar trebui sa efectueze eliberarea resurselor din structura pthread_t.<br class="">In plus, la testul 16 (15 vmchecker), se pare ca valgrind ocupa mult prea multa memorie locala, iar ca urmare este omorat.<br class=""><br class="">student@vagrant:~/l3-so-assignments/4-scheduler/checker-lin$ LD_LIBRARY_PATH=. valgrind --tool=memcheck --track-origins=yes --leak-check=full _test/run_test 16<br class="">==4693== Memcheck, a memory error detector<br class="">==4693== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.<br class="">==4693== Using Valgrind-3.15.0.GIT and LibVEX; rerun with -h for copyright info<br class="">==4693== Command: _test/run_test 16<br class="">==4693==<br class="">Killed<br class=""><br class=""><br class="">Multumesc<br class="">_______________________________________________<br class=""><a href="http://ocw.cs.pub.ro/courses/so/info/lista-discutii" class="">http://ocw.cs.pub.ro/courses/so/info/lista-discutii</a><br class=""><br class=""><br class=""><br class=""><br class="">--<br class="">Răzvan Crainea<br class=""><br class=""><br class="">_______________________________________________<br class="">http://ocw.cs.pub.ro/courses/so/info/lista-discutii<br class=""></blockquote><br class=""><br class=""><br class="">-- <br class="">Cu stimă,<br class="">Mihai Bărbulescu<br class=""></div></div></blockquote></div><br class=""></div></body></html>