Ab origine ...

Volodymyr M. Shcherbyna weblog
posts - 10, comments - 4, trackbacks - 0

My Links

News

Technorati Profile Locations of visitors to this page

Archives

Post Categories

Saturday, December 06, 2008

World crisis is beating us all :)

My hosting plan for www.shcherbyna.com is almost over, and I decided not to continue it in my current place. Instead I am going to move everything to a free for MVPs hosting powered by http://orcsweb.com/. Which means I will follow painful migration procedure and I can lost users, comments and pingbacks. Well, this is bad, agree. On the other hand, I would not lost content (posts, articles) and I will have free hosting which is a way much powerful than previous one. So I decided to give a try.

Please do not be surprised if you will see that blog has changed and all users have been lost. I do my best to make migration less painful, and I hope that will be the case.

P.S. For Russian speaking community: I am sorry, I decided to discontinue translation of all posts into Russian as it takes much time, and usually I don't have it ... On a new hosting posts will be only in English.

posted @ Saturday, December 06, 2008 1:21 PM | Feedback (0) | Filed Under [ general ]

Friday, December 05, 2008

Records of ukr software developer in Switzerland. Problems on getting work permit

Не всегда получается отписывается на айтишные темы на этом блоге т.к. с момента моего вьезда в Швейцарию я больше решаю проблем социального характера нежели технического : ) Идея написания этого поста, и, возможно, целой серии постов под тегом « zupvsh » возникла у меня после множества вопросов которые я получал от знакомых и незнакомых людей, на тему «как туда (т.е., сюда) попасть и как тут живется». Я также надеюсь, что соотечественники из бывшего СССР при прочтении серий этих постов подчеркнут важную и полезную информацию и недопустят ошибок которые совершил я находясь в этой стране.

Итак, все начинается ... С чего все начинается? Верно, с желания сменить страну. Тут стоит заметить, что просто от желания ничего в конечном счете не решается. Можно конечно иммигрировать в страну прося полит. убежища или нелегально, но в этой серии я не планирую рассматривать такие случаи :)

Вобщем, вас посетила мысль сменить страну. В этот момент советую оценить состояние ваших дел и накопленного имущества. Если у вас есть свой дом, своя земля, и куча родственников советую на этом закончить мысли о другой стране и счастливо жить в текущем месте а Швейцарию посещать по турвизе зимой в Альпы а летом на Женевское озеро. В Швейцарии легко купить недвижимость не получится. И основательно обжится (построить виллу, разбить сад, etc) будет трудно, во всяком случае, намного труднее и дороже чем в республиках бывшего СССР. И причина тому – текущая иммиграционная политика которую ведет нынешнее Швейцарское правительство по отношению к выходцам из стран бывшего соцлагеря. Ну а теперь все попорядку.

Получение вида на жительсто и разрешения на работу в Швейцарии для выходца из стран бывшего соцлагаря.

Существуют несколько видов так называемых «пермитов» которые позволяют работать и жить в Швейцарии. Самый популярный из них «B ». Этот тип пермита позволяет жить и работать вам и вашей семье (жене и детям) в Швейцарии в течении 1 года и автоматически продливается на след. год. Получить пермит B для выходца из стран бывшего СССР и не состоящих в ЕС очень трудно:

- Во-первых, процесс длится минимум год. Обычно – дольше.

- Во вторых, что бы получить пермит Б нужно что бы в Швейцарии нашлась компания которая будет согласна вас взять на работу. В таком случае компания должна ждать вас год или больше. И готовить документы. А также платить издержки за оформление документов. (Кстати, по умолчанию местные компании берут только местных, или людей с пермитом Б или С).

- В третьих, официальная позиция швейцарских властей будет направлена на то, что бы не дать вам разрешение : компания будет обязана предьявить властям доказательства что она не может найти специалиста такого уровня в Швейцарии и в странах ЕС. Процесс будет затяжным, местные власти могут требовать от компании доп. обьяснений по кандидату, документам об образовании, награды, сертификации, специализации, чем будет заниматся, и прочее.

В четвертых, существует квота на выдачу Б пермитов выходцам не из ЕС. Квота обычно истощается во второй половине года, т.е. подавать документы на Б пермит в сентябре бессмысленно. Лучше это делать в январе в след. году.

Желание попасть в страну еще не отпало? : ) С вышеперечисленным становится ясно что попасть в Швайц просторабочему не получится. Почему? Местные власти рьяно защищают своих сограждан от «заробитчан» из Румынии и Польши с Украиной которые демпингуют цены да и смысл нанимать кого-то из-за рубежа на работу которую могут делать местные, причем надежней и качественней.

Попасть сюда рядовому программисту тоже не получится. Смысл компании тратить год и ждать человека если можно взять местного с тем же опытом? Смысл платить издержки, переводить контракты, тратится на телефонные разговоры?

Если вы не попадаете в обе эти категории, и у вас появилась компания которая сильно нуждается в вас и готова ждать года, лучший совет – расслабится. Если вы хороший специалист, вы будете в хороших условиях на текущем месте работы, и процесс получения пермита нужно воспринять как парралельную задачу которая может завершится успехом или нет, но в любом случае вы ничего не потеряете :)

Вобщем, из всего вышенаписаного становится ясным, что лучшего всего это когда работа находит тебя, а не ты ее. Действительно, слать резюме из Украины куда нибудь в Швейцарию бессмыссленно, никто его даже серьезно не будет читать. Это как замкнутый круг – никто не берет специалиста т.к. у него нет пермита, а пермита у него нет, т.к. у него нет работы. C’est la vie … Тем не менее, бывают исключения.

Продолжение следует …

posted @ Monday, December 01, 2008 12:00 AM | Feedback (0) | Filed Under [ zupvsh ]

Buying computer in Switzerland

I was inspired to write this post after having tried several companies in Switzerland in terms of computer staff. First thing you notice in Switzerland is that:

1. The prices usually are higher than in US or Canada (difference is quite big)

2. There are only few companies where you can assemble machine from pieces (I mean to buy separately pieces and assembly machine on your own)

3. Microsoft operating systems are everywhere , and usually you cannot get rid of XP or Vista

4. Working staff does not speak English, or speaks but very bad :)

A good place to compare prices for hardware in Switzerland is to visit toppreise.ch and have a look at prices. You will notice main key players on the marked: Dell, HP, stegcomputer and a few more.

Dell (www.dell.ch)

Between companies above, the cheapest will be Dell in terms of price/quality. But you cannot order Dell machine without OS. You also don’t know the exact configuration of Dell machine as they specify only CPU, amount of memory, amount of HDD and the type of monitor. Specification for the most important machine unit: motherboard is missing at Dell website. Why motherboard is so important for me? Because motherboard should allow further upgrade of machine with-in few upcoming years. What is the reason to buy machine at Dell and later when you would like to put more RAM to discover that your motherboard is limited to 4GB of RAM only?

I tried to communicate with Dell regarding what kind of motherboards they do use but the staff spoke French and not English. So I gave up.

HP (http://welcome.hp.com/country/ch/fr/welcome.html)

Too expensive. The same problems as with Dell.

Stegcomputer (http://www.stegcomputer.ch/shop.asp)

You can buy hardware and assembly machine from pieces. But the total price is quite high. Personal does not speak English (I checked in canton de Vaud). Big queues at office. No prices for small things like cables, RJ45 connectors, etc in the office which forces you to stay in the queue and wait a lot just to ask the price.

The main web site is not translated into English. Actually, there are 3 languages in Switzerland, and the main “shop” page is available in German only, not even in French. That’s strange for a company which did 99 millions of euro in 2007 year (http://www.stegcomputer.ch/fr/ueberuns/index.php?active=3) and is unable to translate own web site into 3 or 4 languages :)

Given above, I was desperate to find a good place to order machine without any OS pre-installed with quite low prices. After searching a lot I found this place: http://pcdesigns.ch/. So I gave a try and contacted Robert Mckinnon at support@pcdesigns.ch . After some communication I concluded that:

- The prices are low. Lower then the prices of Dell, HP, stegcomputer and others in Switzerland

- Service can be done in English as well as in other languages

- Support is excellent (I got replies even at late evening)

- Possibility to adjust machine configuration depending on what you want

My requirements were quite special as I wanted machine to run Linux, be powerful and cheap. I need a machine which will be able to run virtualization software and do a lot of compilations and debugging at the same time. Machine having not less than 4 cores and minimum 4 gb of RAM with powerful motherboard and wide monitor. And I was completely satisfied with http://pcdesigns.ch/!

posted @ Sunday, November 02, 2008 12:00 AM | Feedback (0) | Filed Under [ general ]

SMB traffic not captured in TDI filter driver

Recently I met a problem in one of my TDI filters when filtering SMB traffic. The filter driver was able to see outgoing TDI_CONNECT requests to 139 and 445 ports, but during the heavy file upload there was no TDI_SEND requests issued.

Usually in such cases you start to googlize for a solution, and I found a few posts explaining the same problem, but they were actually dead - no reply since 2002 :). I also asked for a question at popular DDK newsgroups assuming this was a well-known issue, and still got no answer.

Well, it started to be more and more interesting, especially taking into account that TDI lacks a lot of documentation and many things have to be resolved myself. I also used IrpTracker, TdiMon, TdiScoup utilities trying to see any missed IRPs but I was failed to see them. I need a point to start researches from. The best in this case is, I believe, a breakpoint to IoCallDriver. So, I opened share, started a file upload on a share, and put breakpoint in debugger:

0: kd> bp IofCallDriver

... and continue by pressing F5. Then break occures:

f62b281c f6e04139 nt!IofCallDriver
f62b2824 f6e03a47 rdbss!RxCeSubmitAsynchronousTdiRequest+0x28
f62b285c f6e0d0a0 rdbss!RxTdiSend+0x1ca
f62b28b8 f6d57609 rdbss!RxCeSend+0x74
f62b28e0 f6d35152 mrxsmb!VctTranceive+0x66
f62b2924 f6d597de mrxsmb!SmbCeTranceive+0x233
f62b2960 f6d5c350 mrxsmb!SmbPseOrdinaryExchange+0x18e
f62b29b0 f6d59668 mrxsmb!SmbPseExchangeStart_Write+0x1e3
f62b29c0 f6d57ab4 mrxsmb!SmbPseExchangeStart_default+0x12
f62b29e4 f6d5be6e mrxsmb!SmbCeInitiateExchange+0x287
f62b2a24 f6e0d49f mrxsmb!MRxSmbWrite+0x309
f62b2a4c f6e110e7 rdbss!RxLowIoSubmit+0x1c3
f62b2a6c f6e1183f rdbss!RxLowIoWriteShell+0x77
f62b2b90 f6e02d51 rdbss!RxCommonWrite+0x116f
f62b2c28 f6e0cbb0 rdbss!RxFsdCommonDispatch+0x353
f62b2c50 f6d57217 rdbss!RxFsdDispatch+0xda
f62b2c70 804ef095 mrxsmb!MRxSmbFsdDispatch+0x134
f62b2c80 8057e70a nt!IopfCallDriver+0x31
f62b2c94 8057c2cd nt!IopSynchronousServiceTail+0x60
f62b2d38 8054086c nt!NtWriteFile+0x5d7
As it seems from stack, the network file redirector is calling TDI (look at function name RxTdiSend) and this confuses me even more, as my filter has to receive IRP in this case. Continue more step by step debugging and I see actually that the request of file system redirector is sent to netbt.sys and not to TDI:

nt!IopfCallDriver:
804ef064 fe4a23          dec     byte ptr [edx+23h]
804ef067 8a4223          mov     al,byte ptr [edx+23h]
804ef06a 84c0            test    al,al
804ef06c 7f0e            jg      nt!IopfCallDriver+0x18 (804ef07c)
804ef06e 6a00            push    0
804ef070 6a00            push    0
804ef072 6a00            push    0
804ef074 52              push    edx
804ef075 6a35            push    35h
804ef077 e854ad0000      call    nt!KeBugCheckEx (804f9dd0)
804ef07c 8b4260          mov     eax,dword ptr [edx+60h]
804ef07f 83e824          sub     eax,24h
804ef082 56              push    esi
804ef083 894260          mov     dword ptr [edx+60h],eax
804ef086 894814          mov     dword ptr [eax+14h],ecx
804ef089 0fb600          movzx   eax,byte ptr [eax]
804ef08c 8b7108          mov     esi,dword ptr [ecx+8]
804ef08f 52              push    edx
804ef090 51              push    ecx
804ef091 ff548638        call    dword ptr [esi+eax*4+38h] ds:0023:81f486e4={netbt!NbtDispatchInternalCtrl (f6da29ef)}

In dispatch function of netbt.sys I see the call to NtSend function: netbt!NbtDispatchInternalCtrl:


f6da29ef 8bff            mov     edi,edi
f6da29f1 55              push    ebp
f6da29f2 8bec            mov     ebp,esp
f6da29f4 56              push    esi
f6da29f5 8b750c          mov     esi,dword ptr [ebp+0Ch]
f6da29f8 57              push    edi
f6da29f9 8b7e60          mov     edi,dword ptr [esi+60h]
f6da29fc 807f0107        cmp     byte ptr [edi+1],7
f6da2a00 897d0c          mov     dword ptr [ebp+0Ch],edi
f6da2a03 0f85b6120000    jne     netbt!NbtDispatchInternalCtrl+0x24 (f6da3cbf)
f6da2a09 56              push    esi
f6da2a0a ff7508          push    dword ptr [ebp+8]
f6da2a0d e838060000      call    netbt!NTSend (f6da304a)

In netbt.NtSend function I see a code which is preparing an IRP to be processed


f6da310e 83ee24          sub     esi,24h
f6da3111 83c004          add     eax,4
f6da3114 894604          mov     dword ptr [esi+4],eax
f6da3117 c7461c832fdaf6  mov     dword ptr [esi+1Ch],offset netbt!SendCompletion (f6da2f83)
f6da311e 897e20          mov     dword ptr [esi+20h],edi
f6da3121 c64603e0        mov     byte ptr [esi+3],0E0h
f6da3125 c6060f          mov     byte ptr [esi],0Fh
f6da3128 c6460107        mov     byte ptr [esi+1],7
f6da312c 8b0b            mov     ecx,dword ptr [ebx]
f6da312e 014f48          add     dword ptr [edi+48h],ecx
f6da3131 8b4730          mov     eax,dword ptr [edi+30h]
f6da3134 8b1d08d1dbf6    mov     ebx,dword ptr [netbt!_imp__IoGetRelatedDeviceObject (f6dbd108)]
f6da313a 83574c00        adc     dword ptr [edi+4Ch],0
f6da313e 50              push    eax
f6da313f 8945f0          mov     dword ptr [ebp-10h],eax
f6da3142 894618          mov     dword ptr [esi+18h],eax
f6da3145 ffd3            call    ebx {nt!IoGetRelatedDeviceObject (804ef658)}

And at the end of a function I see the code which is sending the IRP directly to tcpip.sys TcpSendData handler:


f6da3166 834060dc        add     dword ptr [eax+60h],0FFFFFFDCh
f6da316a 56              push    esi
f6da316b 50              push    eax
f6da316c ff5764          call    dword ptr [edi+64h]  ds:0023:8200c324={tcpip!TCPSendData (f6ea04f0)}
f6da316f 6a00            push    0
f6da3171 6a00            push    0
f6da3173 ff7508          push    dword ptr [ebp+8]
f6da3176 8bf0            mov     esi,eax
f6da3178 e81df8ffff      call    netbt!NBT_DEREFERENCE_DEVICE (f6da299a)
f6da317d 5f              pop     edi
f6da317e 8bc6            mov     eax,esi
f6da3180 5e              pop     esi
f6da3181 5b              pop     ebx
f6da3182 c9              leave
f6da3183 c20800          ret     8
f6da3186 90              nop

Thats actually an answer to the question, why TDI filters are unable to filter SMB session traffic. Netbt.sys simply sends data directly to tcpip.sys via TCPSendData function and I believe, this is done for perfomance purposes.

posted @ Monday, October 13, 2008 12:00 AM | Feedback (0) | Filed Under [ debugging ]

Undeletable bug in VS2008?

I see this bug for a quite a long time, starting from VS2005. To illustrate the problem:

1. Go to project properties, open some tab

2. Do not close the property dialog windows simply change the focus by clicking in code editor

Once you click in code editor, you property window is gone, and you see an empty dialog which looks like this:


posted @ Monday, September 01, 2008 12:00 AM | Feedback (0) | Filed Under [ general ]

Powered by: