As it may be as simple as a loose splice in the ceiling outlet, or a defective switch, most likely it is the "Feed End" accessory, the part that has wires connected to terminals the the bare tips of contacts that actually touch against the track lite busbars.
Here is a web page that shows the various types of feed ends.
http://www.ylighting.com/twocircuit.html
You can try disconnecting the wires and removing the feed end to gain access to the contact points, clean with rubbing alcohol and very fine emery cloth. you want the contact surface clean of oil, smoke, and dust, and be very smooth. Rough sandpaper will reduce the already limited contact surface.
Inspect the inside bus bars on the track for any arcing or pitting. If you can't clean it well enough, simply cut off the damaged portion to get to clean smooth busbar. Thsi may cause changes to the mounting system. Or you can buy new track, your choice.